Hue motion sensors + remotes: custom component

Ok, I’m afraid that does not happen on my setup. As soon as I switch to 1.03 and use:

binary_sensor:
  - platform: hue

no sensors appear :frowning:

Any errors in the log?
Did you add manually the hue.py in the customer component/binary_sensor/ folder?

Just to be sure, you did put the new binary sensor CC in the correct folder under /config/custom_components ?

I just found the issue. I did NOT have hue bridge manually configured in configuration.yaml, but relied on the discovery component.

I now manually configured:

hue:
  bridges:
    - host: DEVICE_IP_ADDRESS

And now it works just fine. Maybe something for the developer to look in to.

1 Like

Just installed v1.03 of this and I’m a little confused with the dimmer button. I previously had 1_click to turn on a light, and now it seems to work better if I set this to 1_click_up.

What’s the difference between the two?

Also - The dimmer still seems fairly flakey in it’s operation. quite often hitting one of the buttons results in nothing happening. A press and hold always seems to work, but a click is very temperamental!

  1. Could you please look if there any suspicious errors during restart if use are using 1.0.3 and not configuring the bridge manually?

  2. Do you still see your lights if the bridge is not configured manually?

There where no suspicious errors and the lights where working normally.

<edit: never mind>

Was there any problem with lights availability when you removed the manually added hue bridge config?

No, the lights are and where working as usual.

1 Like

yes, that is (and always been) my only issue at the moment with the component… For some reason the HA doesn’t always catch the pressed button the first time (and some rare times, the second and third)…
Without this issue, those dimmer remotes would be the perfect remotes not too expensive to control scenes, etc… The only affordable alternative right now is the Lutron Caseta remotes with the wall mounts but you need to have the Lutron pro hub… (expensive just for that if you already have the non pro hub).
My Harmony remote controls some scenes flawlessly (but it’s not a wall mount remote)…

As for the Z-Wave remotes, way too expensive for this purpose IMO…

I too am experiencing this problem. The click and click_up are sometimes missed by the HA.

In my experience over the last couple of days - the click & click_up are more often missed than caught!

The WAF factor is sliding!!! :frowning:

This all sounds great. With out rehashing why it is a pity that this custom component has not become integrated into Homeassistant.
But till then can you give me some direction(this is a long thread) on how to get the motion sensor on/off switch code working. I put it under switch in config.yaml with my key and the proper sensor as determined in the hue debug tool. I have something working in node red but I think its polling my bridge along with this custom component which probably isnt the best. Then I guess I need to go back and learn again about templating to display all the sensors. I had REST working for it but tossed it completely now

thanks

not much more I can give you but this (note it is a command_line switch, and they have:

switch:
  - platform: command_line
    switches:
      laundry_motion_sensor_switch:
        friendly_name: 'Laundry motion sensor switch'
        command_on: >
          curl -X PUT -d '{"on":true}' "http://192.168.1.212/api/key/sensors/22/config/"
        command_off: >
          curl -X PUT -d '{"on":false}' "http://192.168.1.212/api/key/sensors/22/config/"
        command_state: curl http://192.168.1.212/api/key/sensors/22/
        value_template: >
          {{value_json.config.on}}

bit of customization )of which the assumed state is most important cute it gives you the toggle in the frontend instead to the 2 flashes:

switch.laundry_motion_sensor_switch:
  templates:
    icon: >
      if (state === 'on') return 'mdi:toggle-switch';
      return 'mdi:toggle-switch-off';
  assumed_state: false
  group:
    group.philips_motion_sensor_switches:
      friendly_name: Laundry motion

btw, this is completely independent from the CC, and talks directly to the hub.

Been struggling to get the device tracker to work.after updating. I have configured this in the configuration.yaml:
device_tracker:

  • platform: hue
  • platform: bluetooth_tracker

My phone has been configured in the Hue app and I can also see it in the “manage resources” part of the hue labs part, but does not show in the known devices.yaml.

any idea’s?

Oh yes I understand it isnt part of the CC but I agree at some point it could be. I find the functionality very useful for some of my automations.I like, in the evening, for my lights to go thru a routine that simulates sundown in doors and deactivating the motion sensor is a simple way to stop it from being interrupted.

Your first config entry worked perfectly. Thanks a bunch!
Does the second entry go in my custom.yaml?…sorry I have advanced faster in different areas of HASS than others I really have to look at a tutorial on templating

Also what the heck does the device tracker hue custom component do? I mean I installed this a long time ago when such didnt exist as part of it. I thought it was maybe like zone presence detection but after some entries here in the thread I’m more wondering if it doesn’t have to do with hues coming home feature which I didnt use b/c hey their app didnt work for me.

I think I remember the OP talking about zone presence for use with the bayesian component to determine sleep patterns which was really cool but i was still focused on why my stupid netgear router component doent work

The only possible reason why device_tracker does not show is because sensor has lastupdated field empty or contains none or misformatted.

Could you please enable debug with next snippet and look for the logs.

logger:
  logs:
    custom_components.device_tracker.hue: debug

Also, please check in the "manage resources” part of the hue labs that the last used is there.

Philips Hue app is capable of tracking if you’re at home in order to switch on/off the lights when you’re leaving/coming back.

device_tracker.hue is the way to represent this information from the Hue Bridge. I’m using it as my primary home/not-home sensor to trigger all the automations inside HASS.