Hello!
I’m using this code to change a color of a roller shutter based on the state:
- entities:
- cover.rolling_shutter_switch_1
state_action:
action: call-service
service: floorplan.style_set
service_data:
style: |
fill: ${ entity.state === "open" ? "#FF7F7F" : "#BAF5B8" };
transition: ${ entity.state === "closed" ? "fill 5s ease" : "" };
This handles a state as OPEN and CLOSED.
Until here all works well.
How to implement the option to add 2 more colors for the state OPENING and CLOSING?
When it’s in a CLOSED state, and I open it, it goes to OPENING state until it’s moving, then to OPEN. I would like to add another color for that states.
Thanks!
Simon