Hue motion sensors + remotes: custom component

Actually just looked at the GitHub issues, and this has been addressed by @Mariusthvdb here:

Just did what is suggested - rename custom component folder to hue_custom and also in configuration.yaml (or sensors.yaml etc if used) to hue_custom: and it all works fine :slight_smile:

1 Like

Mmm I tried this but it still doesn’t work. I am on 88.2. None of my sensors now appear :frowning:

I renamed the hue folder hue_custom in custom components and changed the references in configuration.yaml from hue to hue_custom.

My ‘production’ HA is on 88.2 and it works and my development HA is on 89b3 and it works too?

Below is the file structure:

And my sensors.yaml (note this version is an older version of the CC that didn’t split into binary & sensor - though the dev one is the newer version and it works fine)

# Sensors.yaml
#Hue custom componenent motion sensors 
  - platform: hue_custom

Hope this helps.

Thanks! Very odd this was my setup. I did a restore to a previous snapshot from 2 days ago and it now works. I haven’t changed anything in the last 2 days at all so no idea what was wrong.

Anyway working now.

Hey i have updated in 0.89.0 i have done all the changes and the error before are gone.

But i can‘t see any Sensor in my home Assistant.

Has anyone some good advices please.

Thx

image

and:

binary_sensor:
  - platform: hue_custom
device_tracker:
  - platform: hue_custom
sensor:
  - platform: hue_custom
4 Likes

I have the same issue.

Just updated to 89 and no light or temperature sensors.

Just to add - I am on the latest vsn of the custom component and I have the updated file structure.

The suggested changes from @michel72 and @markbajaj are working for me on 0.89.0

Just noticed that there has been another change with this in that the platform has changed from hue to hue_custom (config edit & dir name). Look at the code in the post just above.

This change is not on the github page yet.

i´ve done that too but no sensors :frowning:

I’m using the master branch on gitgub and it works for me.

Have you made sure that you have changed the dir name from:
custom_components/hue
to
custom_components/hue_custom

YES !! i will try the reinstall the 0.85.1 version maybe something with the update was wrong

I was in the same place as many others. where the new custom component wasn’t working since HA decided not to allow custom components to only update part of the component…

So what I had to do to get this working (I’m on the newest beta currently).

I uploaded CC files to custom_components/hue_custom/

The name of the folder doesn’t matter. as long as its diff from /hue/

Then in configuration file, I had to put

hue:

note: not using the new folder name here…

Then for platform configurations:

binary_sensor:
  - platform: hue_custom
device_tracker:
  - platform: hue_custom
sensor:
  - platform: hue_custom

Restart - and it works for me… binary sensors for the motion sensors, etc… Just had to use a template for the temperature - and use a formula to change it from Celsius to F. EVerything working as it should.

Edit: Also wanted to add, that although Hue component was always handled via discovery in the past (in my configuration), and I think still is (I’m not specifying host IP for the bridge or anything after hue: ) - it still wouldn’t work until I added hue:

2 Likes

@robmarkcole
I’d really love to see this component become native in HA.
Have you considered submitting the component to them?

In the meantime, after updating to 0.89.0, all states became Unknown or None.
Hopefully this can be updated, preferably without “work arounds” as that only creates problems in the long run.

Thanks a million!

Hehe…:wink: ya i think he has considered it . I think he may have been asked once or twice too :wink:

In any case my file structure that was working and is still working but with the warnings has been custom_components/binary_sensor/hue.py, custom_components/sensor/hue.py, and custom_components/device_tracker/hue.py. So I cant use the structure in the repo I have to use custom_components/hue_custom/ …and put the .py files in there. Looks like I’ll be stuck for the upgrades. I require this component.

Problems after updating from [0.88.2] to [0.89.0]?

Until component is updated this is the solution: https://github.com/robmarkcole/Hue-sensors-HASS/issues/122

Correct, you have to create a new folder /custom_components/hue/ and move both files into it and renaming them correctly.

Move the file “hue.py” from the sensor folder into the new one and rename it sensor.py
Move the file “hue.py” from the binary_sensor folder into the new one and rename is binary_sensor.py

That should normally fix your error. However, since the latest update to 0.89. It broke as well, and the temporary fix is in the link above.

i updatet on 0.89.0 from 0.85.1
Maybe someone has an Idea. I tryed a lot but i got only the state unknown-
This is my Setup.

custom_comonents\huesensor\sensor.py

configuration.yaml

hue:
bridges:
- host: 192.168.178.23
filename: phue.conf

sensor.yaml

  • platform: huesensor

#template

  • platform: template
    sensors:

    flur_motion_temperature:
    friendly_name: ‘Flur oben’
    value_template: ‘{{states.sensor.flur_motion_bewegungsmelder.attributes.temperature}}’
    unit_of_measurement: C

    flur_motion_light_level:
    friendly_name: ‘Flur oben’
    value_template: ‘{{states.sensor.flur_motion_bewegungsmelder.attributes.lx}}’
    unit_of_measurement: lux

Have you tried copying and pasting your template into the template tool in developer tools

35

4th icon to the left

1 Like