How do I create a scene snapshot to capture my heating mode (sub-attributes)?

Hi all,

I have automations setup to switch my heating to away mode if we leave the house and home mode when we return.

I want to make it more clever though - it might not be on Home mode when we leave the house, for instance it could be on Day Off mode, so I would want it to return to that when we return - in essence, whenever we get home, return it into the mode it was before we left.

Figuring I could use Scene Snapshots, but I can’t find a way because the heating mode is an attribute of the main entity:

The device (entity) is ‘climate.home’, and there is an attribute called ‘system_mode_status’ and below that another attribute called ‘mode’, and it’s that attribute I need to capture.

Any ideas please? As is probably self-evident, I am not great with YAML!

Thanks so much!

Paul

And creating a scene on the fly and restoring it didn’t work?

Hi, thanks for the reply. No, it’s frustrating. So I got to this:

data:
snapshot_entities:
- {{ state_attr(‘climate.home’, ‘status’)[‘system_mode_status’][‘mode’] }}
scene_id: test_1

If I put this in Dev tools:

{{ state_attr(‘climate.home’, ‘status’)[‘system_mode_status’][‘mode’] }}

It correctly returns the state of the heating mode (Auto) in this case:

But in the automation, it gives this error:

Error: Entity ID Auto is an invalid entity ID for dictionary value @ data[‘snapshot_entities’]

Any further thoughts would be really appreciated!

Paul

You just capture climate.home, no template.