Hello!
I kept searching on the forum how to display a sensor tag (based on area) in picture elements but I didn’t find any solution.
In my case, I have a sensor (sensor.chipolo_area) with the attributes Area ID and Area name (living , bathroom, bedroom, etc.).
I can’t change the color of the icon when the tag sensor is in the respective location. In the case below (Area ID bathroom)
Btw, what is a use-case?
You placed a particular entity on a card - and you are supposed to know it’s area. Means - no need of card-mod.
Also , the template has an error: if a condition is true, then “color: red green”. Seems you missed “else”.
Basically I need to show the icon only when the object is in that room. Otherwise, no.
I’m trying to use Bermuda BLE and plan integration to help an elderly person find in which room they left their cell phone and various items that have tags attached. It is easier for him to look at a tablet with a large display (which only displays the plan) mounted on the wall and see on the plan in which room the respective objects are located.
I mention that I do not know how to modify the code. I just tried to modify a code presented on the forum.
There are objects which are tracked in which room they are located. Means - these objects have either a state or an attribute with a value pointing to a room.
On PE card you need to show a state-badge with “top/left” dependently on a room.
Means:
This is not about changing an icon color.
You need to set “top/left” dynamically by card-mod for every tracked object dependently on it’s stage/attribute (which is NOT some “area” - because an “area” is something static set by a user).