Hue motion sensors + remotes: custom component


#793

image

and:

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

HUE Custom Component after update, how to change it with 0.89
#794

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.


#795

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


#796

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.


#797

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


#798

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


#799

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


#800

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


#801

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:


#802

@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!


#803

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.


#804

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


#805

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.


#806

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


#807

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

35

4th icon to the left


#808

now i did it

Error rendering template: UndefinedError: ‘None’ has no attribute ‘attributes’

but it works on 0.85.1 fine.

Do you think now i have to adjust it ? the next question was how ^^

thx for your idea…

now a have a new point, i will check this thanks a lot


#809

I get that when I put the wrong sensor name in - double check your sensor is called sensor.flur_motion_bewegungsmelder

Just did the same template using my sensor name and it worked fine.

I’m on 0.89.1


#810

that is it the entity´s are wrong. I don´t know why i think the cause is the update.

anyway THANKS for helping me out.

I learned another piece.

Have a nice weekend.

greetings from Germany Jan


#811

now the template are working and i could find the hue switches perfekt.
But i get no value for tem and light.


#812

The only thing I can think of is to look in the actual sensor details like below:

See if there are values there as this is where the template will pull the values from.

to get here click the < > icon in developer tools