Hi,
I have a couple of Hue motion sensors around the house and I am wondering how could I see only a badge/icon/name of the last one that got triggered and replaced every time another motion sensor gets triggered. That would be a cool feature to see in which room my dog is when I’m out
Thanks in advance for any suggestions!
I use the HACS integration Variables + History. This creates a sensor.last_movement from my hue motion sensors, which is displayed in an entity card on a dashboard.
Be warned - it gets weird if there is more than one person (or dog) in the house.
1 Like
Could you maybe share the script/card configuration you use? Would be muuch appreciated
The HACS Variables+History integration has recently been upgraded, so that once installed new instances are added in the UI, on the Settings | Integrations page.
Mine generates one sensor sensor.last_movement, which has the initial value on startup of “unknown”. When movement is detected a short script runs to change the sensor value - for example:
alias: Movement living room
sequence:
- service: variable.update_sensor
data:
replace_attributes: false
value: living_room
target:
entity_id: sensor.last_movement
mode: single
At the moment there’s a script for each room - I’m sure they could be combined into a single script, but I’ve never got round to it.
I actually use Entity Controller from HACS to turn lights on and off in response to motion sensors, and this also launches the appropriate script, but an automation would do it just as well.
The card is just a normal entities card on my overview dashboard:
PS
I also use sensor.last_movement to allow me to use short commands like “Spotlights on” with Alexa. The command launches an Alexa Routine, which in turn launches a HA script which decides where I am from the last recorded movement.
If the dog is wandering around, this is where it gets weird - the lights may come on in the room she’s in.