Using scenes to declare a persistent intended state?

Hi there!

I’m a big fan of scenes in Home Assistant, but I wish you could use them to declare an intended state rather than (or in addition to) directly actuating the relevant devices.

IIUC, if I turn a scene on in Home Assistant, what it does is send commands to all relevant devices to put them in the desired state.

This works, but has shortcomings. In particular, if a command for some transient reason fails to, say, turn a lightbulb off, that’s it, it will stay on. Or if someone cycles the power on a lamp, most lamps will turn on, regardless of whether the last scene I activated asked for it to be on or off.

I would like to have some way for scenes to be aware of whether they are “on”, and to specify exclusivity sets (sets of scenes of which only one can be active at a time: if scenes A, B and C are in a set, turning scene A on implicitly turns off B and C).

That way, we could have HA regularly checking whether current device states differ from the ones specified in scenes that are “on”, and send corrective commands if they do.

Or is this already part of HA and I’m just not smart enough to figure it out?