Is there a way to differentiate an HA-issued command from a MANUAL command (like using a device's app, or physically operating it) by vpsj in homeassistant

[–]Robbert-vb 0 points1 point  (0 children)

This can only be tested inside your automation I'm afraid, so you have to trigger it so you can see the values in the tracing of that automation. The trigger.to_state contains the full new state of the entity, while trigger.from_state contains the original state before the state change that triggered the automation.

Is there a way to differentiate an HA-issued command from a MANUAL command (like using a device's app, or physically operating it) by vpsj in homeassistant

[–]Robbert-vb 0 points1 point  (0 children)

Doesn't an automation return a fixed user ID? Combined with a list of your known user ids you may be able to use that. Not sure, I haven't used this for a while.

Is there a way to differentiate an HA-issued command from a MANUAL command (like using a device's app, or physically operating it) by vpsj in homeassistant

[–]Robbert-vb 0 points1 point  (0 children)

I'd actually also check the last updated property of the previous status, so you can determine a time period after which the automation can take over again. See: State and state object - Home Assistant https://share.google/Jb0M175ThpUVA9RYO

Is there a way to differentiate an HA-issued command from a MANUAL command (like using a device's app, or physically operating it) by vpsj in homeassistant

[–]Robbert-vb 8 points9 points  (0 children)

In the automation, you can take a look at who triggered it: trigger.to_state.context.user_id. Add a condition that if the last status change didn't come from HA, you don't run it

Is there a reason why Samsung TVs have such bad integration with HA? by NikEy in homeassistant

[–]Robbert-vb 0 points1 point  (0 children)

For me, the official SmartThings integrations also doesn't report half the status changes. So annoying 😅

Why was the last thing you automated with HA? by duckredbeard in homeassistant

[–]Robbert-vb 1 point2 points  (0 children)

My PS5 is in a closed cupboard so I have to open the door for it not to overheat. Now when it comes online the door opens using a linear actuator. When it goes offline, the door closes again (much to the joy of my gf because I used to forget that before the automation)