Possible to programmatically toggle group of climate & switch entities?

Hey everyone,
I have a group with 3 climate entities and two switches.
image

When i open the grp window, everything toggles great by using the UI switch.
Is there a way to programmatically do this?
I tried homeassistant.toggle but it only works on the switches and ignores the climate entities.
Any clues?
Thank you!

Hi @krash ,

Why don’t you define a “scene”, that represents all the states, that you want to have.
You should be able to trigger the scene manually or via automation.

HomeAssistant → Settings → Devices → Scenes

Chris

Hey @schneich, Thanks for the input.

I am aware there are several work-arounds to do this, through a template switch, a script or a scene as you suggested.

I was wondering if there a was a way to do it on a group entity directly, without having to write extra code, which would simplify things in general :slight_smile:

If you add a entity card, you can activate the ‘show header toggle’ :
image

This will then show as a group toggle on the card itself:
image

Yup, this already works on my setup, i just need a way to toggle it through a script/automation.

If i run homeasstant.toggle with the group as a target, it wont work.

Hmm… I don’t think that toggle is available as an entity within HA itself, so the only thing I can think of is to use a group that you would switch from a script/automation…

Trying a toggle service on the group does not work, that’s why i’m looking into it :slight_smile: