Deconz + Hue Motionsensor Dark = null

Hi,
all my motionsensors in Home Assistant get dark: null
In Rest API its normal. Why?

binary_sensor.bewegungsmelder off battery_level: 100
friendly_name: FlurUG_Bewegungsmelder
dark: null
device_class: motion

Thanks
Steve

Can you post what you say is normal?

Deconz doesn’t see the dark parameter for the hue sensor thats why it is null. In next release if dark is null it won’t be visible as an attribute.

in my case: dark = true or false in rest api of deconz

Could you paste the rest api response so I can see if something differs?

Otherwise, you could enable debug for deconz component and get the network prints so we can understand why it doesn’t properly read the dark for hue motion sensor

sorry for late. thats what I see on api for my motionsensor: (deconz api)

{“config”:{“alert”:“none”,“battery”:100,“ledindication”:false,“on”:true,“pending”:[],“reachable”:true,“tholddark”:12000,“tholdoffset”:7000,“usertest”:false},“ep”:2,“etag”:“86fa3883746c8c6c6ccf6dd173ffbf63”,“manufacturername”:“Philips”,“modelid”:“SML001”,“name”:“FlurOG_Bewegungsmelder_2”,“state”:{“dark”:true,“daylight”:false,“lastupdated”:“2018-03-25T18:04:51”,“lightlevel”:8417,“lux”:7},“swversion”:“6.1.0.18912”,“type”:“ZHALightLevel”,“uniqueid”:“00:17:88:01:02:13:10:87-02-0400”}

Great! Philips reports this with its lightened sensor, which is different from Ikea who reports it with the presence sensor.

Will add this.

Thanks for reporting

Hi Robban,
i saw that you insert dark and lightlevel in code but i dont have it in home assistant as attribute.
do you have an idea?

Hi Steve!

So I haven’t added it to sensors, I forgot this. Will try to remember to do a PR tonight

that would be great :slight_smile:

Fixed!

Will be integrated with https://github.com/home-assistant/home-assistant/pull/14480

thanks robban