Issues with toggling lights with the top card toggle
rhoriguchi opened this issue · 3 comments
My Home Assistant version: 2021.12.10
What I am doing:
Toggle the top card toggle.
What I expected to happen:
The top toggle should toggle all lights on also the group and its sub lights.
What happened instead:
It only toggles the Living room
light but not the Entrance
light group and its sub lights (Hallway
, Window
).
Minimal steps to reproduce:
configuration.yaml
yeelight:
devices:
yeelink-light-mono5_mibt1D55.iot:
model: mono5
name: Entrance window
yeelink-light-mono5_mibt9166.iot:
model: mono5
name: Entrance hallway
light:
- entities:
- light.entrance_hallway
- light.entrance_window
name: Entrance
platform: group
# Living room is a template switch witch gets used as a light with a light `turn_on` and `turn_off` behavior, but this bug happens with any light with a single light and a group.
ui-lovelace.yaml
resources:
- type: module
url: /local/hs-lovelace-module-fold-entity-row.js?v=2.0.13
title: Home
views:
- cards:
- entities:
- light.bedroom
- entities:
- entity: light.entrance_hallway
name: Hallway
- entity: light.entrance_window
name: Window
head: light.entrance
type: custom:fold-entity-row
show_header_toggle: true
title: Lights
type: entities
Error messages from the browser console:
None
- Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
- Have made sure I am using the latest version of the plugin.
- Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
- Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
That's a limitation in Home Assistant. Nothing I can do, unfortunately.
@thomasloven, could you elaborate on the reason this limitation exists on Home Assistant? I'm also struggling with this pain point and would like to either open an issue with them or work on a PR to fix it
Try to create this simple test:
type: entities
title: test
entities:
- entity: light.xxxxxxxxxx
- type: custom:fold-entity-row
head: group.lights_yyyyyyyyyyy
open: true
entities:
- light.yyyyyyyyyy_1
- light.yyyyyyyyyy_1
- ....
- light.yyyyyyyyyy_5
This is how it looks in UI editor:
Note that the "Show header toggle" = ON by default - but the header toggle is NOT added:
It happens because HA adds the toggle only if more the one "toggleable row" is present (input_boolean
, switch
).
Here HA thinks that only ONE "toggleable row" is present - HA seems to not consider this custom row as "toggleable".
Then add some input_boolean
row:
- entity: input_boolean.test_boolean
And see what happens - the header toggle is added, and it works only for conventional rows:
Conclusion - the header toggle works with conventional rows only.