Prevent visible state change of switch until new device state is confirmed

Hi there, it’s been a long time since I’ve properly used home assistant, but I’m back at my dad’s place for a week and helping him with some extras.

I have several scenarios where a ‘switch’ in home assistant represents a real status. The easiest example is a hot water heater time clock which has a standby mode.
Standby can be triggered by a button on the timer itself, or remotely including via home assistant.
The issue is, sometimes the timer doesn’t actually register the ‘standby on/off’ command and so, we have a scenario where the home assistant switch may show ‘off’ but the timer is in fact on.

I have no problem commanding the timer and receiving a response, so what I’d like is the following:

Changing the switch state in home assistant should show the intended switch state, but greyed out or otherwise obvious that it’s ‘changing to off/on’ rather than ‘actually off/on’
When the confirmation comes from the device, the switch should show the usual of or on icon, and be obvious that it’s indeed in that state.

I’m sure it’s very simple, but I can’t work it out. Thanks in advance for the help!

The you should use the response in a state value_template for the switch so that Home Assistant knows the real state.

Please share your switch config.

It’s more about the user knowing the state in a clean way. I had thought about using a helper and toggling that, but it seems clunky hence the post.

The switch config is still a WIP but it’s just an entity created from the node-red integration and I control it within node-red via the API of the thermostat

What could be “cleaner” than showing the correct state of the switch?

Forget NR and use this:

It has this: