Is there a way to know if a switch was triggered by HA, or by a GPIO (physical pin)?

Hello all,

As per title.

I’d like to be able to report, like a sensor, when a switch is triggered/toggled by a physical pin on the board rather than by software.

The reason for this is, in an integrated platform like HA, it can be useful to know this, because it indicates that a human is doing a manual override of the current scene. It enables the system to react differently than according to an assumed script: if a human is wandering around pushing buttons, then either pause the current automation, or react in a particular way.

Is there a way to do this within the existing framework? It’s something I’d like to look into.

Thank you.

Could this be helpful?

1 Like

Hi @anon63427907, thank you, that is interesting reading. I’ll need to chew on it for a while.