Enable distinction between input sources: Automation, User, or External (e.g., original app) #23197
Unanswered
Felix-Kiefer
asked this question in
Automations / scripts / scenes
Replies: 1 comment
-
Probably a "context" object is what you need to analyse. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My Problem is currently, that I can't distinguish if a device or entity was turned on by an automation, a user input (like a button on the web panel that was manually triggered), or by an external app (for example: original app of the product, or through HomeKit).
This limitation makes it difficult to implement logic that depends on knowing the exact origin of a state change. For example, automations might need to behave differently based on whether a device was turned on by a user, a specific automation, or an external app.
In my opinion, the perfect solution for that would be an additional "trigger" in the automation tab on the website, where I could select between event triggered by "user", "automation", "external change".
One main use case would be a smart self build thermostat controlled by Home Assistant:
User-initiated change: A user manually turns on the heating. A timer automation starts to turn it off after 15 minutes.
Automation-initiated change: A price-aware automation turns on the heating when electricity is cheap. No timer should start.
External change: The original app (outside of Home Assistant) turns on the heating. Home Assistant recognizes this and applies custom logic, such as notifying the user.
Beta Was this translation helpful? Give feedback.
All reactions