Watcher1
(John)
March 12, 2023, 9:09am
1
Following my SATEL ALARM integration in HA, i am now trying to show indication of motion sensor state in a floor plan like this:
- type: state-icon
entity: sensor.integra_pir_grafio
icon: mdi:run
style:
top: 40%
left: 74%
value_template: '{{ ''VIOLATED'' in states(''sensor.integra_pir_grafio'') | default([]) }}'
action:
'--iron-icon-stroke-color': '#8c1414'
border-radius: 50%
text-align: center
background-color: rgba(255, 255, 255, 0.3)
So the icon should change color when sensor (zone) state turns to ‘violated’ but… its doesn’t work.
What am I doing wrong?
Olivier1974
(Olivier Toussaint)
March 12, 2023, 11:48am
2
Is that CSS?
Inspire yourself from this topic
Hello,
I’ve just found the picture-element https://www.home-assistant.io/lovelace/picture-elements/
I drawn my appartment plan , and I wanted to change the color of my PC depending on its state (whether it is on or not).
I have a device tracker that say “home” or “not_home”.
I don’t know how to do it in a easy way. What I have done is with a conditional element.
Here after the PC is call bonite and device tracker is managed by my freebox.
The PC icon comes green if at home and red if not
t…
OzGav
(Oz Gav)
March 12, 2023, 10:00pm
3
Technically this “floorplan” sub-category is for the ha-floorplan custom component. No biggie but picture elements discussions should be over in configuration-frontend.
Watcher1
(John)
March 13, 2023, 7:54am
4
Apologies!
Is there anyway to transfer this thread to the other section?
OzGav
(Oz Gav)
March 13, 2023, 8:49am
5
You could maybe flag your post and see if a mod can move it
SoSmart
(Suf)
May 19, 2023, 9:29am
6
Hi John, did you managecto solve this? I am trying to do the same. Thank you
OzGav
(Oz Gav)
May 19, 2023, 11:46am
7
If you are using ha-floorplan then post your query with more detail. If you are using picture elements then try the other forum