Active state of a pyscript State Variable #303
Replies: 3 comments 4 replies
-
In fact, there is one work-around, it's to use the template-entity-row card which allow to customize when an entity is highlighted, but in my case I'm using the multiple-entities-row card, which is similar to the standard Entities Card on the "active" topic. So, what I would like to know, is how HA consider an entity "active", and how to customize it within pyscript. |
Beta Was this translation helpful? Give feedback.
-
Replying again to myself :)
But still, I'm interested in a pyscript-only solution, that would prevent me to create yet another entity. |
Beta Was this translation helpful? Give feedback.
-
Quick guess here: HA is probably looking for the entity state to be 'on' in order to determine if it's active. So using state.set(entity, 'on') might work. |
Beta Was this translation helpful? Give feedback.
-
Hi,
In my script I created a State Variable with
state.persist()
andstate.set()
(withinpyscript.
domain).I'm also using an Entities Card to display the value of this state. This card can "have icons colored when entity is active".
So my question is, how can I define in pyscript when a state/entity is active or not?
If not possible directly, is there any workaround you see?
Thanks!
Jean-Rémy
Beta Was this translation helpful? Give feedback.
All reactions