Am I understanding this right? – it looks like the lux value from the Hue sensors is updated at a default 5 minutes IF there hasn’t been any motion to trigger an automatic update? Wondering if we could be able to poll the sensor more often (say every minute) for it’s current lux value.
this is not the case: even when switched Off, the sensors report immediate light level change.
I have the behaviour you’ve described (even posted a video somewhere in this thread). @Mariusthvdb I think I’ve seen it before, but now it’s once in a 5 minutes for me too.
only thing I could think of to explain is I test with holding my hand over the sensor to see it drop the light level. Might it be that even when the sensor is switched off, it still notices the movement?
I just tried to add a template binary sensor for a washing machine on/off situation and lost all of my sensors motion temp lux everything from this custom component. I think this is the only binary sensor I have added myself.Any ideas why this is happening?
Edit: Sorry everybody I had no binary_sensor entries and the custom component worked and when I finally added binary_sensor: to configuration.yaml I failed to add the -platform: hue entry under it. I have added it now and all sensor data has returned.
I just updated to version 0.88.0 of hassio, and get several messages regarding custom components needing to be in their own folder.
So instead of
custom_components > binary_sensor > hue.py
It needs to be:
custom_components > hue > binary_sensor.py
and also in the same hue folder needs to be device_tracker.py & sensor.py
I have made these changes and all seems to be working and no more errors
The other thing that I’m seeing is an error saying that ‘token’ & ‘ip_address’ are not supported:
Your configuration contains extra keys that the platform does not support.
Please remove [token]. (See /config/sensor.yaml, line 56)
Here is my current code sat in my sensor.yaml:
- platform: hue
ip_address: 192.168.1.18
token: !secret hue_token
about the latter, this should work with the latest component:
binary_sensor:
- platform: hue
device_tracker:
- platform: hue
sensor:
- platform: hue
—edit: updated earlier post and added the dashes. missed that before, sorry. Talking HA 87.1
Thanks for that!
Do I just add that code within my sensor.yaml file? my installation is split out into files.
no, these should be each (anywhere) under their respective components in your config.
Ive put these together in a package
just like shown above.
but you can also do it in configuration.yaml
gotcha - sorted - many thanks!
Hey!
I don’t get it after Update to 0.88.1 with the latest custom component 1.0.4.
I get the following “warning”:
Your configuration contains extra keys that the platform does not support (but were silently accepted before 0.88). Please find and remove the following.This
will become a breaking change.
[hosts]. (See /config/INC/device_tracker.yaml, line 7).
[name]. (See /config/INC/sensor.yaml, line 0).
I get (I splitted my configuration) and this the structure I use:
Configuration.yaml
hue:
bridges:
- host: xxx
sensor:
- platform: hue
device_tracker
- platform: hue
binary_sensor:
- platform: hue
Folder structure:
custom_components
hue
binary_sensor.py
device_tracker.py
sensor.py
Has anyone an idea how to solve this?
Regards!
— cancel-- post
Yeah I dug into this a little more - it looks like a limitation with the reporting of the sensor itself.
Based off response here: https://developers.meethue.com/forum/t/how-often-does-api-data-from-motion-detectors-update/5144
The motion sensor uses standard ZigBee attribute reporting to inform the bridge of the values:
- The
presence
value is reported every 5 minutes, and when the motion sensor value changes (from motion to no motion or from no motion to motion);- The
lightlevel
value is updated every 5 minutes, and when the motion sensor value changes by 2000 or more;- The
temperature
value is reported every 5 minutes, or when the motion sensor value changes by 20 (0.2 degrees) or more.
So @Mariusthvdb when you say you are getting immediate feedback, you must be triggering the motion sensor.
might very well be the case. Still, it is remarkable, because it does so even when the sensors are switched Off. Which I can do in Ha via a command_line switch, and is confirmed in the Hue app.
@kiromatis
And what about renaming sensor.py to __init__.py
with two underscore ie _ as prefix and postfix to init ?
Thanks! But, unfortunately I don’t know how to do it(?)
I also tried:
I changed everything from plattform: hue → platform: hue_custom and rennamed the hue folder to hue_custom within custom_components folder
… but, the result is the same…
Your configuration contains extra keys that the platform does not support (but were silently accepted before 0.88). Please find and remove the following.This
will become a breaking change.
[hosts]. (See /config/INC/device_tracker.yaml, line 7).
[name]. (See /config/INC/sensor.yaml, line 0).
I think I have to wait for a more “native” solution within HASSIO.
my config looks exactly like yours (and no more keys).
for example:
device_tracker:
- platform: hue_custom
- platform: bluetooth_tracker
My complete log says:
2019-02-23 17:07:29 WARNING (MainThread) [homeassistant.loader] You are using a custom component for hue_custom.device_tracker which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-02-23 17:07:29 WARNING (MainThread) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support.
Please remove [hosts]. (See /config/INC/device_tracker.yaml, line 6).
2019-02-23 17:07:54 WARNING (MainThread) [homeassistant.loader] You are using a custom component for hue_custom.binary_sensor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-02-23 17:07:56 WARNING (MainThread) [homeassistant.loader] You are using a custom component for hue_custom.sensor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-02-23 17:07:56 WARNING (MainThread) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support.
Please remove [name]. (See /config/INC/sensor.yaml, line 10).
Just for clarification:
It doesn’t make any difference if I use “hue” folder or “hue-custom” folder within custom_components folder (https://github.com/robmarkcole/Hue-sensors-HASS/issues/117). The result is the same.
and to complete my configuration details:
hue:
bridges:
- host: !secret hue_ip
allow_unreachable: true
allow_hue_groups: true
yeah, I deleted my post after I reread yours. Also went back and looked closer at mine and my hue remotes are missing. So, I’m in the same boat as you.
good to know that I’m not alone