Hue motion sensors + remotes: custom component

Since the remotes are moved to the ‘remote’ domain, does anyone have an example on how to get the battery level of a dimmer (the rectangular one) into a sensor using a template-sensor? Not really that deep into this stuff yet, unfortunately.

So has the delay problem been fixed yet?
I have automations that turn on lights based on lux levels and it usually takes 2-5 seconds till the lights turn on

I’ve updated to latest release and still same problem

Hi

I installed this component but it doesn’t show any hue remote after I reboot. No errors in the logs either.
My hue bridge is added via the discovery component and working correctly.

Any ideas where to start troubleshooting?

try:

    hue_dimmer_switch_1_battery:
      friendly_name: 'Dimmer switch1 battery'
      unit_of_measurement: '%'
      value_template: >
        {{ state_attr('remote.hue_dimmer_switch_1','battery') }}
      device_class: battery

of course adapt according to your remote entity name

Thanks, I tried that but it didn’t help.
I figured it out though, I was using a custom hue component because of a code tweek for my Innr lights and because of this the huesensors component couldn’t load fully. I edited _init.py to the following:

def get_bridges(hass):
from custom_components import hue
from custom_components.hue.bridge import HueBridge

Now my remote shows up fine as an entity and I’ve been able to configure it in automations.

Hi all, thanks for this awesome plugin.
One question, is there a way to detect the number of time a button has been clicked. This feature exists in Hue application. (For example, on 1st click then set scene A, on 2nd click then set scene B).
Would be nice to have this. I believe information should be known somewhere by Hue Bridge.

Thanks,

HI all,

Everything works with v2.2 but soon as I update to 2.10 and change the config to:

remote:
  - platform: huesensor

from

sensor:
  - platform: huesensor

the dimmer & tap switches disappear from my overview page and none of the my automations work.

What else do I need to change or what am I missing?

The entities will have changed from sensor.[...] to remote.[...], so you have to update your automations, etc. accordingly.

With the upgrade to v3.0 for huesensor and HASS 106 my hueremote throw this error on config check:

Platform error remote.hueremote - Integration ‘hueremote’ not found.

My config matches the readme:

remote:
  - platform: hueremote

Anyone else know how to reconcile this?

1 Like

Place the custom_components folder in your configuration directory (or add its contents to an existing custom_components folder). You need to set up your Hue bridge first. TODO Alternatively install via HACS.

you need to install a new integration in HACS

1 Like

My remote stopped working with hue advanced sensors 3.0.

It took me some time to figure out that the component got split into two components (sensor and remote).

What’s the reason for splitting the component? Did not find some information about that on github.

Also I didn’t find release notes about 3.0 and this breaking change.
@robmarkcole would it be possible to add breaking changes like that to the readme in future? Or are they already somewhere and I did not find them? It would be great if breaking changes would show up in hacs too (if possible).

Yes remotes are in their own repo now, which can be installed via HACS. Couple of technical reasons, but mostly this is to help out the maintainers. As this is a custom integration the release process is not as managed as HA. I am dealing with a newborn baby and fitting in coding when windows of opportunity pop up. Frankly it puts a lot of pressure on open source maintainers to expect a professional service for something we are doing in our spare time

Thanks for your reply, I totally understand. I think just adding something like “Breaking change: component splitted” would already help to avoid too many questions form users.

I just noticed that my remote got unavailable after a restart of ha core. It already worked yesterday and I don’t see an error in the logs. Any suggestions how I could fix this. The component worked fine for months when it was in hue advanced sensors.

Well the release notes do discuss this:

I think they could be clearer with hindsight, but when you’ve only had a couple of hours sleep a day for several weeks this is what you get

1 Like

Update on the Hue sensors repo (doesn’t affect Hue remotes repo):

PLEASE BE ADVISED: you are strongly encouraged to use the official Hue sensor integration, and cease using this custom integration.

Longer explanation: sensor support in the official hue integration is more feature-complete than this custom integration, and if you’re already using Hue-remotes-HASS, then the refresh rate for sensors in the official integration will be automatically the fastest possible. Since we want to migrate users to the official integration, please do not open feature request issues or create PR adding new functionality to this custom integration, as they will not be considered. This custom integration will remain available until the next breaking change with Home Assistant, at which point this repo will be archived.

After restarting ha core a few times the component works again. The thing is if I restart there is a big chance that it’s gets unavailable again. Also I noticed that it’s like a 100% chance to get the state unavailable, when I’m restartig home assistant (hassio). Is this a known issue? Have to say that I didn’t track the state of this entity before (with hue sensor advanced) so I can’t see if this was there earlier. The thing is I never had issues with the remote, so I guess it was fine. Now it seems like I have to remember to check the state of the entity after each restart and restart again if unavailable.

@robmarkcole, could you elaborate on this? The reason this custom component had been so appealing is that the official Hue integration’s refresh rate was painfully slow (which I understand is due to Hue’s API), at least up until the time I had installed my first Hue Motion Sensor. Is that refresh rate improved through the use of Hue-remotes-HASS?

TLDR use the remotes CC for fast motion sensors. The long explanation is too technical for this forum. Enjoy

Ok, that makes the remotes CC fairly valuable, thank you.