Hue motion sensors + remotes: custom component

This is ok !!

This not. All the Sensors temp and light looks like this.

I use the files from github
image

Just remembered, I was showing you the screenshot from my production HA which uses the older component. The newer one is binary.sensor:

now i got it !!!

thx a lot. sometimes it is not easy with no knowledges in programming.

now it is done.

I appreciate your help :slight_smile:

1 Like

This worked for me.
Thank you !

you must be on an older version of the CC, the latest version has extra attributes:

22

I’m having an issue with the motion sensors not tracking correctly. All was working fine with v0.8 on HA 0.88, then I decided to upgrade to HA 0.89. Following this I have started using the latest release of the CC (1.0.4), deleted all the old files and config.yaml entries, and put the new binary_sensor.py in custom_components/huecustom, then set up binary_sensor in config.yaml.

So far, so good - both my motion sensors are picked up by HA and all the correct data is retrieved. However the behaviour of the sensors in HA is now very odd. If I trigger a sensor, it changes from ‘off’ to ‘on’ - however, even if I’m still moving, it then immediately switches back to ‘off’ again. After a short reset time (about 10s or so) it will then respond to movement again - but again will immediately switch back to ‘off’ in spite of persistent movement.

No problems with the sensors themselves which are reporting state correctly to my Hue app.

Is this a known issue with v1.0.4? Any idea about workarounds? May have to downgrade to v0.8 again in the meantime as I have automations based on accurate and timely reporting of motion.

UPDATE: Can confirm sensors work as expected having reverted back to v0.8

Hi,
So you’re running v0.8 (hue cc) on HA .89
Can you please confirm your settings.

I would really like to upgrade up I to many settings that use this CC

Sure. v0.8 hue.py copied into custom_components/huesensor and renamed to sensor.py.

Config.yaml:

hue:
  bridges:
    - host: 192.168.1.xxx
      allow_hue_groups: false

sensor:
  - platform: huesensor
    ip_address: 192.168.1.xxx
    token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1 Like

I do also have problem with the hue sensors after upgrading to 0.89.

I have downloaded the three new files and placed them at custom_components/huesensor/

When I in my binary_sensor.yaml files add the line - platform: hue, I receive an error saying: Configuration invalid CHECK CONFIG Platform not found: binary_sensor.hue

What do I do wrong? the Hue Hub works with my lights so that part should be fully functional?

Configuration need to match the folder structure.
If dir is named huesensor you need to use - platform: huesensor

1 Like

is this hue sensor stuff in the main system - i.e. do i need a custom component?

Wups… That seem to fix my problem… Thank you @ludeeus!

Hey M or anybody who kind of knows what there doing I have been using this code to disable, enable the motion sensors as a command line switch:

  bedroom_sensor_switch:
    friendly_name: 'bedroom motion detector switch'
    command_on: >
      curl -X PUT -d '{"on":true}' "http://192.168.1.10/api/redacted/sensors/3/config/"
    command_off: >
      curl -X PUT -d '{"on":false}' "http://192.168.1.10/api/redacted/3/config/"
    command_state: 'curl http://192.168.1.10/api/redacted/sensors/3/'
    value_template: '{{value_json.config.on}}'

and I noticed this error (?lately)

Error parsing value: ‘value_json’ is undefined (value: None, template: {{value_json.config.on}})

Is there something wrong with the code or is it something else. The switches still appear functional in my frontend

Thanks all

NVM

Mariusthvdb provided the answer here but kind of a weird switch in the front end now
https://community.home-assistant.io/t/toggle-phillips-hue-sensors-on-off-from-hass/36734/13

Is this one supported in the component? The new Philips outdoor sensor that is :slight_smile:

Yes, the outdoor sensor looks just like the indoor sensor in HA. Works like a charm once you have the custom component sorted.

1 Like

@ajoyce I have the same problem. How have you downgraded? Just use the old tutorial?

Yes - go to the Github page, go to Releases and get v0.8 there - the old instructions are included in the zip file

1 Like

No problems with the custom component?

you have one installed?

could you please share a screenshot of the attributes it has? I can’t find any documentation from Philips showing what features it supports, other than motion (lx, light level, temperature, battery, etc etc)

I mean this more-info:

03
a screen from the api too would be great please?