Add Core Hue Motion Sensor Switch

Hi! New to Home Assistant, and have the Hue Integration installed. I was wondering would it be possible to request a switch entity for Hue Motion Sensors. It’s possible to do via the API.

5. Sensors API - Philips Hue Developer Program (meethue.com)

The reason this would be helpful, is for example, I have automations when my TV comes on, and lights get dimmed, shades go down etc, and I want the Hue sensor Motion Sensor to be disabled so that when I move on my couch, it doesn’t trigger the lights to come on again. Once TV is off, then the Hue Motion Sensor can turn back on, and light automation returns to normal.

I’m not good enough with code quite yet to try and contribute to the Github core/sensor.py at 7e7267f8229e8429e09b8177784b5e52b0abef93 · home-assistant/core · GitHub but I am trying to learn and see if I can figure it out myself. By the time I actually am able to learn code and contribute, someone might have found a quick way to get this done.

Thanks!

though a previous request to add the motions sensor switches to core HU integration was denied, you can still do this now:

switch:
#Hue hub 2
  - platform: command_line
    switches:
      driveway_buiten_sensor_motion:
        friendly_name: Driveway buiten sensor switch
        command_on: >
          curl -X PUT -d '{"on":true}' "http://192.168.1.58/api/ID/sensors/27/config/"
        command_off: >
          curl -X PUT -d '{"on":false}' "http://192.168.1.58/ID/sensors/27/config/"
        command_state: curl http://192.168.1.58/api/ID/sensors/27/
        value_template: >
          {{value_json.config.on}}

ID =. your local Hue hub ID

Maybe you should rename your FR to: add core Hue Motion sensor switch, to make to more descriptive. O, and vote for it yourself :wink: I’ll +1

Thanks! I’ll take all your suggestions. Appreciate it!

1 Like

Do you know why it was denied? Seems like it would be useful

no I dont remember tbh. maybe its worth the trouble to re-enter in a discussion with the main Hue dev’s. Using the switches in my config throughout, and I would love core support for them, instead of having to deal with these command_line switches.

this should be closed long time now, motion sensor switches are in Core Hue integration, ever since the migration to V2 api

1 Like