I have been trying to set the css class based on the state of a cover. I can see that the cover
is associated with the element (hovering over the element shows info, and clicking it brings up the control).
But it doesn’t set the class of the linked element based on the state of the cover.
This:
- name: Trunk
entities:
- entity: cover.model_y_trunk
element: trunk_open
state_action:
service: floorplan.class_set
service_data: '${(entity.state === "open") ? "visibility-on" : "visibility-off"}'
perpetually shows this (you can see the “hover info”):
Even when the state is not open
:
However, this (simply using another entity type, and input_boolean
):
- name: Trunk
entities:
- entity: input_boolean.guest_mode
element: trunk_open
state_action:
service: floorplan.class_set
service_data: '${(entity.state === "on") ? "visibility-on" : "visibility-off"}'
toggles the trunk_open
element just fine; this is how it looks while input_boolean.guest_mode
is not on
:
I have tested the cover
s in multiple floorplans and with multiple different settings, but nothing seems to work.
Is this something about cover
s in general, or something specific to the entities provided by the tesla custom integration? Unfortunately, I don’t have any cover
entities that are not related to the car, so I can’t test whether this is a cover
problem or a tesla custom integration problem.
EDIT: The (in progress) svg file, css, and yaml can be found here: https://github.com/Aephir/ha-tesla-lovelace-floorplan/tree/main/troubleshooting . Updated files are in the top level of the same repo (for when I start too fix things)
EDIT: I am using other entities from the tesla integration in another floorplan (both the device_tracker
and the sensor.model_y_battery
), which seem to work fine (also to “set class”; this is the colored battery circle), leading me to suspect cover.*
in general more than the integration: