I’m trying to get a toggle for all the entities in a card and I thought the “show_header_toggle: true” would do that but it is not working. Any help is appreciated.
old_frontent:
Lovelace_frontent:
I’m trying to get a toggle for all the entities in a card and I thought the “show_header_toggle: true” would do that but it is not working. Any help is appreciated.
old_frontent:
Lovelace_frontent:
Can you share the part of the ui-lovelace.yaml file that you’re having issues with? This is working fine for me, here’s a sample of my config:
- type: entities
title: Lights
show_header_toggle: true
entities:
- light.bedroom
- light.hall
- light.living_room
- light.office
Sure, here it is.
- type: entities
title: Alarm TTS
show_header_toggle: true
entities:
- automation.tts_back_door
- automation.tts_garage_door
- automation.tts_front_door
sorry, fixed.
- type: entities
title: Alarm TTS
show_header_toggle: true
entities:
- automation.tts_back_door
- automation.tts_garage_door
- automation.tts_front_door
Interestingly enough, works fine for cards with lights. maybe an issue with entities that are not lights or switches?
I’m having the same issue and yes, it looks like it doesn’t work for anything that isn’t a light or a switch. I want to have a toggle for certain automation groups (therefore I can’t use group.all_automations) that I create in lovelace. Not sure how to go about this.
make a switch template that turns on/off the all_automations group.
switch:
- platform: template
switches:
all_automations:
value_template: "{{ is_state('group.all_automations','on') }}"
turn_on:
- service: homeassistant.turn_on
entity_id: group.all_automations
turn_off:
- service: homeassistant.turn_off
entity_id: group.all_automations
I’m looking to create a switch only for certain automations, i.e automations related to certain rooms of the house, some automations but not others, for example. The above is useful to create a switch for all automations (which for me, is better than nothing) but ideally would like a way to bunch automations together in a group and create a switch for them somehow.
Sorry but I just don’t see the dilemma. If you want a sub set of automations, just make a group with the automations you want. Then make the switch template for the group.
group:
mygroup:
entities:
- automation.auto1
- automation.auto2
switch:
- platform: template
switches:
all_automations:
value_template: "{{ is_state('group.mygroup','on') }}"
turn_on:
- service: homeassistant.turn_on
entity_id: group.mygroup
turn_off:
- service: homeassistant.turn_off
entity_id: group.mygroup
I knew it was something simple, this is exactly what I’m looking for. Thanks!
The same issue,marked.HA 0.86.0
Use the Lovelace UI editor to disable/enable the toggle for groups.