Hue motion sensors + remotes: custom component

@Davy_Uittenbogerd what do you mean with “reinstalled HomeKit”? How did you do that? Do you mean disabling it by uncommenting the configuration of the component, restarting HA, enabling the code and restarting HA again?

Hello. First of all thank you for the great work.
After upgrading to HA version 0.110.x my log file shows the following:

[homeassistant.components.binary_sensor] BinarySensorDevice is deprecated, modify HueSensor to extend BinarySensorEntity

Nevertheless the component seems to run smoothly as usual.

Hello,
I have now installed both in custom compnents: hue sensors and hue remote.

The remote works fine and I can control my pool pump but I have now realized that the pool pump started at night and coold down the pool… I have found in Node red that there was written “1_click_up” at 1:13am. No one was awake at that time and clicked the button.
How can this happen?
Does anyone of you have the correct definition of “click”, “click_up” and “hold”? For me it seems not defined. sometimes it is a “click” and sometimes a “click_up”.

Thanks
argo

1 Like

This has happened to me previously; I use the last_updated attribute as the trigger on a Tap remote. The automation registered a click in the middle of the night and triggered the automation. The Logbook showed that Hue became Unavailable and then Available again at the same time in the Logbook, which must have appeared as a click to HA. I added conditions to prevent that from happening in the future.

I would like to see the same thing.

Can someone tell me how to take the hue dimmer switch that’s now showing up as a battery level sensor (sensor.gameroom_switch_battery_level) as a device trigger in an automation? I want to be able to use the “hold” button option on some automations.

Please help!

+1.
Would like to know as well.

HI, long time no see…

please have a look here Rest command setting Hue sensitivity stopped working

do you still use this, and if yes, does it still work? I seem to have run into an issue, and cant find it…

please check will you? Thanks!

Hi Mariusthvdb,

Yes it still works fine for me. I believe I’m on the latest Hue v2 hub firmware version. Home Assistant wise I’m on 0.115.6.

  hue_command:
    url: 'http://HUE_BRIDGE_IP/api/API_KEY/{{ type }}/{{ id }}/{{ command }}'
    method: put
    payload: '{{ data }}'

And as part of an automation:

  action:
  - data:
      command: config
      data: '{ "sensitivity":1 }'
      id: 7
      type: sensors
    service: rest_command.hue_command

I moved all my Hue Dimmers to use the Event Triggers native to home assistant. Home Assistant can see events from the Hue Bridge and use them, similar to how some other scene controllers work.
You can use the hue_event trigger to run them natively.

Just stumbled across this as my next project is to make better use of my Hue remotes. The documentation in GitHub states to use the official integration rather than your own. But I can’t find any documentation on how to control the remotes from the integration.
Should I be using yours or the official?

This project is deprecated as such, You can use Hue Sensors natively in Home Assistant now.

The Hue Remotes do not show up as switches, you use the events they send out as triggers for your automations. On the developer tools you can listen for hue_event and use these events as triggers for your automations.
This topic might help Where are the new entities for Hue (dimmer and tap) switches - Configuration - Home Assistant Community (home-assistant.io).

The Hue dimmers give a 4 digit event code from my experience (I use several of them) and you have separate events for press, release, and hold for each button.

So you listen to the event on the Developer Tools page ( Listen for hue_event if you use the hue bridge) and then grab the information for the switch you are using and use the events as triggers.

I don’t use a Hue Bridge, using everything on deConz instead, but this is something I use, using events, to control a bathroom light/fan. It may be more complex than you want, but it gives you an idea.

> id: "202011602300000"
> alias : "Bathroom - Switch manual control"
> description: " "
> trigger:
>   - platform: event
>     event_type: deconz_event
>     event_data:
>       id: "bathroom_switch"
> condition: []
> action: 
>   - service_template: >
>       {% if trigger.event.data.event == 1000 %}
>         light.turn_on
>       {% elif trigger.event.data.event == 2000 %}
>         switch.turn_on
>       {% elif trigger.event.data.event == 3000 %}
>         switch.turn_off
>       {% elif trigger.event.data.event == 4000 %}
>         light.turn_off
>       {% endif %}
>     data_template:
>       entity_id: >
>         {%- if trigger.event.data.event == 1000 or trigger.event.data.event == 4000 -%}
>           light.bathroom_ceiling
>         {%- elif trigger.event.data.event == 2000 or trigger.event.data.event == 3000 -%}
>           switch.bathroom_fan
>         {% endif %}

Edit: Don’t copy and paste the code as is, I use “packages” and that code won’t work if directly copied into your automations file, it is just to give you an idea :slight_smile:
1000 is the top button (on) pressed
2000 is the dim up button pressed
3000 is the dim down pressed
4000 is bottom button (off) pressed.

I am using the dim buttons to turn the fan on and off and the on and off to turn the light on and off. Don’t need dimming in the bathroom :slight_smile:

Thanks for that. I’ll take a look. I have several dimmers so will look at how to handle the events and then hopefully convert to a Blueprint.

I have a simple state machine (input_select) that drives an automation to set various scenes etc. This is then partnered with Lovelace set of cards to set and react to the state and a couple of input_booleans.

So I want the remote to simply set the state so the automation can unify the response.

I only want to intercept the on/off and let the dim buttons do as they do…

Hi everyone, I know that the this custom component has been deprecated in favor of the official Hue integration, but I wanted to ask to the philips hue users in this forum if some of you are using the geofence or device_tracking capabilities of the hue bridge.

In my case I implemented a rest sensor long (years) ago, that had been working like a charm.

But since (wrongly) updating the hue app, there is something broken and the device_tracker (or geofence sensor) that I was getting with rest api calls is not updating anymore on the bridge.

Does someone have a magic recipe to make it work?

Thanks in advance!

well, tbh, the device_tracker has never worked in my setups, they all reported home always…

maybe give us your rest sensor, so we can have a look.

I had a brief glance in the current HUE code, and there is still mentioning of the geofence, although I havent seen a device or entity using it.

maybe only for device automations (but I dont have those, so I couldn’t tell)

Hi there,

Got here because I was looking for CLIP sensors. So what happened to them, can I still use them?