HUE motion detector not working (though temp & lux works)

Hi,

running Hassbian, latest HA.

I have problems getting HA to act on the motion sensor. The temperature & Lux from same device works fine. I have this in my sensors.yaml

- platform: rest
  resource: !secret hue_hallway_motion_sensor_url
  value_template: '{{ value_json.state.state }}'
  scan_interval: 2
  name: 'Hallway Motion'

and this in automation.yaml

- alias: Trigger on motion
  trigger:
    platform: state
    entity_id: sensor.hallway_motion
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: light.bedroom

Looking in “Development tools”/States I have a sensor called

sensor.hallway_motion

and as said above, the temp & lux sensors in the same unit works fine. I’d appreciate some help getting this to work correctly.

Thanks.

Really? What is wrong this time? I simply wanted to trigger the actions of motion on a set of conditions, but it wouldn’t trigger at all, as configured in Home Assistant. It works in the sense it is not broken - works with the HUE app. But if this one is too complicated for this forum, then I’ll have to rethink my home automation approach. I don’t need much automation, but that I need, I want. I guess I have to try other software as well then. If all fails to do what I need, I’ll design my own python/API solution. But self-maintained code is never the best way, or might be in this case… Sigh.

Do you see the sensor.hallway_motion actually changing between ‘on’ and ‘off’?

Why are you using a template sensor, does the hue motion sensor not work in the proper hue component?

Hi, In Home Assistant, no. Motion sensor gives me nothing at alI, only the lux and temp gives me any values. I have most probably got something wrong, and why I use a template sensor… I got that from an example I found on google where they talked about directly accessing the senors. I have the bridge defined in configuration.yaml. By template you mean using the rest api instead of the “platform: hue” way of defining it?
Thanks

Yeah thats what I meant., I don’t have one myself, but just looking up hue motion sensor suggests that the native component may not support it and this person has written their own component for it. Have you tried that one?

Thanks! I missed that one. I will give it a shot later tonight. It sound like it may be what I am after. :slight_smile: