Hiding toggels in Lovelace Entities Card

I have an Entities card that contains two groups. The toggle is hidden in the groups but still shows on the entities card (arrowed below).

Is there a way to hide these?

2 Likes

The only way I found to do that was by creating a Template Binary Sensor that copies the state of the entity.
If you use this sensor in the entities card it will show without toggle and will follow the entity’s state.

BTW:
I recommend that you replace your normal groups by light groups. They inherit more attributes from their grouped entities (like dimming and color) and can set these attributes over all their children too.

Thank you.

Would you care to show how you did it?

I have actually moved all such logic over to Node Red.
But here is an (untested) example for you:

binary_sensor:
  - platform: template
    sensors:
      outdoor_lights:
        friendly_name: "Outdoor Lights"
        value_template: >-
          {{ states("group.outdoor_lights") }}
      all_outdoor_lights:
        friendly_name: "Security Light Groups"
        value_template: >-
          {{ states("group.all_outdoor_lights") }}

This should create synchronized copies of the state of group.outdoor_lights and group.all_outdoor_lights in binary_sensor.outdoor_lights and binary_sensor.all_outdoor_lights.

If you use these binary_sensors in your entities card they will not show toggle switches but a text states (because sensors cannot be changed).

Another way to do it is by using the ‘slider-entity-row’ component, which is available in HACS, you can disable(hide) the ‘slider’, the state, toggles, whatever you like.

image

1 Like

Apologies for the late reply. I’ve only just seen it. Thank you for your help.

Just in case the question is still relevant for some users, I have answered it in another topic with the same issue: How to Hide Entity Toggle Switch - #4 by ardrift