Is anyone familiar with if its possible to set the state of a group to something else with an automation?
In the front end when you tap on a group that doesn’t have switches, it pops up a card that displays a bar showing its state and the state is constant as unknown. I would like to use the state of a sensor in its place by updating the state based on the sensor then hide the sensor from the front-end. Below is code I’ve tried but doesn’t work. Hoping someone will have done this or have some suggestions.
automation:
alias: change nest group state to heating
trigger:
platform: state
entity_id: sensor.living_room_thermostat_hvac_state
to: 'heating'
action:
entity_id: group.nest
state: 'heating'
alias: change nest group state to off
trigger:
platform: state
entity_id: sensor.living_room_thermostat_hvac_state
to: 'off'
action:
platform: state
entity_id: group.nest
state: 'off'
I have a group of scripts which trigger playing radio stations. Currently the group state is always “off” or “Aus” even though I have set “control: hidden”. It would be great if the group state would either display something like “off” and “playing” or, even better, when playing, display the currently played radio station name.
Do you have an idea how to achieve this?
Is there a solution to this? Sometimes due to the Life360 problems at the moment I need to override a device tracker or two and just set “group.individual” to not_home
You can change state of your group (as state of any HA object) by using this python script.
I’ve just tried it successfully.
The only issue you might have is at some point HA might restore the group’s state back to what it was…
Another approach is to go through ALL objects of the group (which is doable) and change their state by calling home assistant.turn_xxx.