Hey there,
I’m pretty new to home assistant but I’ve found a solution to all my problems so far. But now I’m stuck and I need your help.
I’ve successfully installed Home Assistant 0.80.0 and deCONZ (2.05.39 / 22.9.2018 - with RaspBee FW 26240500) - both as docker containers and they are working well. I can use the IKEA remote and all bulbs and toggle and automate them in hass.
But the motion sensor wouldn’t do what I want:
The motion sensor is correctly displayed in hass frontend, I can see that it’s state changes when I move in front of it. But when I want to use this to trigger an automation it’s not working.
Normally it should work like this:
trigger:
platform: state
entity_id: sensor.tradfri_motion
to: 'on'
But when observing the state dev tool and the logs, I can see that the state is always on - it doesn’t matter if the motions sensor detects something or not.
The logs are showing, that the sensor is signaling movement by the tag “presence = true”.
... [pydeconz.deconzdevice] tradfri_motion: update presence with True
... [pydeconz.websocket] Websocket data: {"e":"changed","id":"2","r":"sensors","state":{"dark":true,"lastupdated":"2018-10-16T21:40:09","presence":true},"t":"event"}
Therefore I tried to make use of that and use it as a trigger:
trigger:
platform: template
value_template: '{{ states.binary_sensor.tradfri_motion_sensor_.presence == True }}'
But unfortunately this is not working as expected.
So I think the deCONZ component is not correctly implementing the motion sensor via the deCONZ API (and therefore observing the state is not helpful), but it should be possible to get a trigger working anyway?
The attributes shown for the sensor in the frontend are:
battery_level: 100
on: true
dark: true
friendly_name: tradfri_motion
device_class: motion
Does anyone have an idea how to solve this?
Thanks in advance!