Replies: 1 comment
-
Hi. First, check how you have it configured in Inkscape. The ID should have the same name as the entity in home assistant. in floorplan.yaml: ########################################################
# Average temperature TEXT display
########################################################
- entities:
- sensor.povprecje_temperature_di
- sensor.povprecje_temperature_jedilnica
- sensor.povprecje_temperature_kopalnica
- sensor.povprecje_temperature_kuhinja
- sensor.povprecje_temperature_michele
- sensor.povprecje_temperature_nata
- sensor.povprecje_temperature_spalnica
- sensor.povprecje_temperature_vhod
state_action:
- service: floorplan.text_set
service_data: >-
${(entity.state !== undefined) ? Math.round(entity.state) + "°C" : "unknown"}
- service: floorplan.class_set
service_data:
class: static-temp
tap_action: false in floorplan.css: svg,
svg * {
pointer-events: all !important;
cursor: default !important;
margin: 0px !important;
padding: 0px !important;
max-height: 100vh !important;
z-index: 0;
}
svg path {
stroke: inherit;
stroke-width: 0px !important;
}
/*######################################################
# Average temperature TEXT display
######################################################*/
#tekst {
fill: white !important;
font-weight: 900 !important;
text-shadow: 0 0 5px black, 0 0 10px #FF0000;
font-family: 'Single Day', cursive;
opacity: 1 !important;
z-index: 50 !important;
} You should get something like this: If you want you can check out my example: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
first time, sorry for my bad english.
since one month i work on ha floorplan.
i have created my floorplan on floorplaner.com
i have edited it with incscape.
light, window and climate are working fine and i want. :)
but i don´t running the temperatures on the right place.
they are all showing on the same position, see screenshots.
on dashboard, all temperatures shown on the top left corner very smal.
on inscape i have create the text you can see, and name it like the sensor.
my dashboard raw
`title: Zuhause
views:
path: floorplan
theme: Google Dark Theme
badges: []
type: panel
cards:
full_height: true
config:
image: /local/floorplan/zuhause/newhome3.svg
stylesheet: /local/floorplan/zuhause/zuhause.css
log_level: info
console_log_level: info
defaults:
hover_action: hover-info
tap_action: more-info
rules:
- name: lichter
entities:
- entity: light.wohnzimmer_lichtschalter
element: wohnzimmer-licht
- entity: light.kamin
element: wohnzimmer-kamin-licht
- entity: light.wohnzimmer_schrank_licht
element: wohnzimmer-schrank-licht
- entity: light.jonas_lichtschalter
element: jonas-licht
- entity: light.jonas_nachtlicht
element: jonas-nachtlicht
- entity: light.schlafzimmer_lichtschalter
element: schlafzimmer-licht
- entity: light.bad_lichtschalter
element: bad-licht
- entity: light.flur_lichtschalter_right
element: flur-licht
- entity: light.flur_lichtschalter_left
element: badezimmer-licht
- entity: light.kuche_lichtschalter
element: kueche-licht
- entity: light.esszimmer_lichtschalter
element: esszimmer-licht
- entity: light.svenja_lichtschalter
element: svenja-licht
tap_action: homeassistant.toggle
state_action:
service: floorplan.class_set
service_data: entitystate-${entity.state}
- name: heizung
entities:
- entity: climate.heizung_wohnzimmer_heizung_wohnzimmer
element: wohnzimmer-heizung
- entity: climate.heizung_jonas_heizung_jonas
element: jonas-heizung
- entity: climate.heizung_schlafzimmer_heizung_schlafzimmer
element: schlafzimmer-heizung
- entity: climate.heizung_bad
element: bad-heizung
- entity: climate.heizung_badezimmer_heizung_badezimmer
element: badezimmer-heizung
- entity: climate.heizung_kuche_heizung_kuche
element: kueche-heizung
- entity: climate.heizung_esszimmer_heizung_esszimmer
element: esszimmer-heizung
- entity: climate.heizung_svenja_heizung_svenja
element: svenja-heizung
tap_action: homeassistant.toggle
state_action:
service: floorplan.class_set
service_data: entitystate-${entity.state}
- name: fenster
entities:
- entity: binary_sensor.wohnzimmer_fenster_links_contact
element: wohnzimmer-fenster-links
- entity: binary_sensor.wohnzimmer_fenster_rechts_contact
element: wohnzimmer-fenster-rechts
- entity: binary_sensor.jonas_fenster_contact
element: jonas-fenster
- entity: binary_sensor.schlafzimmer_fenster_contact
element: schlafzimmer-fenster
- entity: binary_sensor.bad_fenster_contact
element: bad-fenster
- entity: binary_sensor.kuche_fenster_contact
element: kueche-fenster
- entity: binary_sensor.esszimmer_fenster_contact
element: esszimmer-fenster
- entity: binary_sensor.svenja_fenster_contact
element: svenja-fenster
state_action:
action: call-service
service: floorplan.class_set
service_data: entitystate-${entity.state}
- name: temperaturen
entities:
- sensor.wohnzimmer_temperatur_temperature
- sensor.jonas_temperatur_temperature
- sensor.schlafzimmer_temperatur_temperature
- sensor.bad_temperatur_temperature
- sensor.badezimmer_temperatur_temperature
- sensor.esszimmer_temperatur_temperature
- sensor.svenja_temperatur_temperature
- sensor.kuche_temperatur_temperature
state_action:
- service: floorplan.text_set
service_data: >-
${(entity.state !== undefined) ? Math.round(entity.state *
10) / 10 + "°" : "unknown"}
tap_action: false
`
my css
`/* Entity On/Off */
.entitystate-on {
opacity: 0.7;
}
.entitystate-off {
opacity: 0;
}
.static-temp, .static-temp tspan {
fill: #ffffff;
position: fixed;
transform: skew(213deg) scale(1.5) translateY(-190px) translateX(70px);
}`
what i am doing wrong?
i want to show the temperatur on the created positions and format them in 20px big white font.
Thanks 4 help
Greatz WU
Beta Was this translation helpful? Give feedback.
All reactions