Hi guys,
is there a way to have the old switch icon back? Like in the Demo?
This is what I have now:
I would like the old one back:
Any ideea how can I can revert?
Regards
Hi guys,
is there a way to have the old switch icon back? Like in the Demo?
This is what I have now:
I would like the old one back:
Any ideea how can I can revert?
Regards
Add this in your configuration.yaml under homeassistant:
customize:
switch.ENTITY_ID:
assumed_state: false
Thank you. Now they are back.
Another question on this idea, is there a way to hide that switch at all?
I have some door sensors that appear as switches it would be great to hide that switch icon for them. Since that is triggered only by opening the door.
customize:
switch.ENTITY_ID:
hidden: true
This will hide the entire element. I just want to hide the blue switch in the left. And keep the element as a “view only”.
I don’t want for somebody to alter it by mistake from the GUI. It will change his status only by automation.
Ahh, I understand. I am not sure if that is possible.
Ideally your switch should have been added as a binary sensor, but that will probably require updating some code.
Yes, I know. But I am not able to add it as a sensor. Thank you for your support.
Maybe as a feature request, it would be great to have the option to make a switch(or some other item) “view only”. In order to prevent unwanted actions.
You can hide that switch and use a binary_sensor to show if it’s ON or OFF
I would put a “Say what???” meme here This is new for me. Thanks.
I would have to read more on it, because it is not simple as it looks.
I assume that states.switch.ENTITY_ID.state is the one I should check.
Yes, use something like this:
binary_sensor:
platform: template
sensors:
viewonlysensor:
value_template: "{%if states.switch.ENTITY_ID.state == 'on' %}ON{%elif states.switch.ENTITY_ID.state == 'off' %}OFF{% endif %}"
friendly_name: 'Switch is on?'
The if
, elif
and endif
are for some kind of customization of what the sensor shows, if you just wanna show “plane state”, just use:
binary_sensor:
platform: template
sensors:
viewonlysensor:
value_template: "{{ states.switch.ENTITY_ID.state }}"
friendly_name: 'Switch is on?'
Thank you.
Yes, I was intrested in just a plane status. I used the same configuration like in your second example, but I had to add after the state: == “on”. I think the sensor is just true or false, no?
states.switch.Entity_ID.state == “on”
And it will return true or false.