kdzoha
December 14, 2021, 6:10pm
1
There’s this wonderful project auto-entities, GitHub - thomasloven/lovelace-auto-entities: 🔹Automatically populate the entities-list of lovelace cards , that allows to display entities based on a query like so:
filter:
include:
- name: "Bedroom *"
- entity_id: "sensor.temperature_*_max"
What would be really interesting is to have the ability to do the same thing for groups… for example
main_bathroom_switch_group:
name: Bathroom Lights Group
entities:
- switch.main_bathroom_exhaust_fan
- light.main_bathroom_vanity_lights
laundry_room_switch_group:
name: Laundry Room Lights Group
entities:
- switch.laundry_room_main_lights
- light.laundry_room_whisper_light
garage_switch_group:
name: Garage Lights Group
entities:
- switch.garage_main_lights
- light.garage_outlet
these groups follow the nomenclature: ‘object_type’.‘room_name’_entity_non_friendly_name.
would be so cool to be able to make groups like this…
Similarly lovelace-ui.yaml seems to have a way to list entities in a room… (actually haven’t figured out how it does it yet, since you can’t pick entity attributes with room name/id)
I found in a custom package somewhere a working example
{%- set attribval = trigger.event.data.new_state.attributes.battery_critical -%}
{%- set attribname = 'battery_critical' -%}
{%- endif -%}
"entity_id": "{{ trigger.event.data.entity_id }}",
{% if attribname is defined -%}
"{{ attribname }}": "{{ attribval }}",
{%- endif %}
"delete_battery_sensor": "homeassistant/sensor/{{ trigger.event.data.entity_id.split('.')[1] }}_battery"
}
- alias: update_battery_status_group_members
initial_state: 'on'
trigger:
- platform: time_pattern
minutes: '/1'
seconds: 00
action:
- service: group.set
data_template:
object_id: "battery_status"
entities: >-
where they use “group_set” and automation every minutes to update a group list.
Anyone knows a better way to accomplish this?
3 Likes
khvej8
(Khvej8)
April 1, 2022, 10:13am
2
Did you ever find a solution for this. I would like to generate groups of light based on the “area” of the device.
bathroomlightgroup:
entities:
- light.* with area set to bath
3 Likes
snikay
(emka)
June 25, 2022, 9:53pm
3
same here. anyone has a hint on how to solve this? thanks
kdzoha
June 26, 2022, 1:48am
4
I’ve not had time to actually try this… my current work around is to use auto-entities and display lights by rooms instead of making a group… it serves the same purpose…
at least this way when I add a light to the living room I don’t have to change anything on the dashboard…
But i’m still interested in getting this done… surprised more people aren’t curious about this…
- type: "custom:button-card"
template: card_title
label: Lights
- type: custom:auto-entities
card:
type: grid
columns: 2
square: false
card_param: cards
filter:
include:
- domain: light
area: Living Room
options:
type: "custom:button-card"
template: card_light_slider_collapse
variables:
ulm_card_light_enable_slider: true
ulm_card_light_enable_collapse: true
- domain: switch
area: Living Room
entity_id: /^.*light.*$/
options:
type: "custom:button-card"
template: card_light_slider_collapse
variables:
ulm_card_light_enable_slider: true
ulm_card_light_enable_collapse: true
2 Likes
smos08
December 23, 2022, 3:04am
5
can you post your button-card template yaml ? i really like this look !
DvdNwk
February 28, 2024, 4:16am
6
yeah, i love auto-entities (UI)
i’d love same for the groups + easier automations for bulk group actions (backend)
Have you seen this?
And in combination with this:
Hi,
I’m not sure if I’m in the correct category, sorry if I missed it.
There is this section in the release notes of 2024.3:
Running script from your dashboard with user input
I would like to implement a similar config. I found no detailed walk-through, nor other information apart from the video (not very helpful) and the sample blueprints.
Can someone please explain to me how this works, how can I make a similar button on my dashboard like in the video?
I created a blueprint based on the …
respective this
Drag 'n drop in your dashboards using a brand-new sections view and start up twice as fast! Run scripts with user input from your dashboards, a new energy graph for individual devices, new sentence...
you could even build a dashboard input to dynamicly create group helpers for rooms, stages, devices, labels. I think even wildcards where possible
kdzoha
December 23, 2024, 6:37pm
8
IIUC you’re suggesting running a script from the dashboard, whereas it fires the blueprint… not sure I follow? Might need a bit more time to digest this, but would appreciate if you can tldr it for me…