#Show how many lamps are on
1 messages · Page 1 of 1 (latest)
If I were trying to be funny, I would say let's ask 'Gul Madred'.
counting lamps is pretty easy with a template and a label - something like:
{{ label_entities('My Lamps') | select('is_state', 'on') | list | length}}
then have a light.turn_off action target that label to turn them all off
Another option is the below with action to toggle off
type: home-summary
summary: light
vertical: null
grid_options:
rows: null
columns: 6
tap_action:
You need to be aware of devices auto assigned as lights, you could
potentially disable these / make not visible (not sure if this will work)
I have a Helper | Group | Lights that includes all my lights that I use in the toggle
tap_action:
action: perform-action
perform_action: light.toggle
target:
entity_id: light.master
I would like to make a pop-up menu where I can then turn off the lamps
I use browser_mod for pop-ups. (Follow this link for pop-up specific usage.)
There's a pop-up card - template for popup service that can be used to (probably) make things easier to configure. (I don't use it myself; I have everything contained in the action of the originating card.)
The screenshot is the pop-up shown when I press and hold the button for my bathroom lights. You can see the code I use for this dashboard here. Currently, it starts at Line 520, but I haven't updated lately so if it changes, look for this: ```yaml
- type: custom:button-card
template: generic_custom_button
entity: light.bathroom_lights
```Keep in mind that this is a YAML-mode dashboard and I use YAML anchors which are not available in a UI-based dashboard. YAML anchors are used to repeat frequently used bits of code. This is an example of a YAML anchor being applied:<<: *popup_layout_card_options.