Hue motion sensors + remotes: custom component


#548

I not sure it’s available to the UK yet, I’ll keep searching :slight_smile:


#549

Hi, need some help with the Hue Dimmers…
I’ve been using this component for a very long time and it generally works great.
The only issue I’m having since the beginning is with the Hue Dimmer setup with automations setting scenes with the buttons.
Often, randomly, I need to click it more then once to get it to trigger the scene…
When I monitor the hue dimmers, it really triggers the command every time but the scene doesn’t always turn on on first click…

example of my sensors for the last updated:

# For hue remotes (last update)
  - platform: template
    sensors:
      interrupteur_sous_sol_last_updated:
        friendly_name: Hue remote sous-sol Last Updated
        value_template: '{{ states.sensor.interrupteur_sous_sol.attributes.last_updated }}' 
  - platform: template
    sensors:
      interrupteur_sous_sol_battery:
        friendly_name: Interrupteur sous-sol batterie
        value_template: '{{ states.sensor.interrupteur_sous_sol.attributes.battery }}'
        unit_of_measurement: "%" 
        icon_template: >-
          {% set battery_level = states('sensor.interrupteur_sous_sol_battery')|int('unknown') %}
          {% set battery_round = (battery_level|int / 10)|int * 10 %}
          {% if battery_level == 'unknown' %}
            mdi:battery-unknown
          {% else %}
            {% if battery_round >= 100 %}
              mdi:battery
            {% elif battery_round > 0 %}
              mdi:battery-{{ battery_round }}
            {% else %}
              mdi:battery-alert
            {% endif %}
          {% endif %}          

ex of automation:

- id: huesoussol1click
  alias: hue_remote_soussol_1click
  trigger:
  - entity_id: sensor.interrupteur_sous_sol_last_updated
    platform: state
  condition:
  - condition: state
    entity_id: sensor.interrupteur_sous_sol
    state: 1_click_up
  action:
  - data:
      entity_id: scene.soussol_relaxe
    service: scene.turn_on        

Had to use the 1_click_up instead of 1_click because the last one doesn’t always triggers (need to hold it for like 1 -2 sec)
Maybe I’m doing something wrong too…


#550

Is it possible to set the brighter/dimmer buttons on the remote to continue to function as dimmers. Here’s what I got so far which works as a slider in the front end bot not on the remote. Is some one able to point me in the right direction?

- alias: Lamp Dimmer
  trigger:
    - platform: state
      entity_id: sensor.living_room_switch
      to: '2_click_up'
    - platform: state
      entity_id: input_number.livingroom_brightness
  condition:
    condition: and
    conditions:
    - condition: state
      entity_id: light.living_room_lamp
      state: 'on'
    - condition: state
      entity_id: light.living_room_pendant
      state: 'off'
  action:
    service: light.turn_on
    data_template:
      entity_id: light.living_room_lamp
      brightness: "{{ states('input_number.livingroom_brightness') | int }}"

#551

When I put the python file in my custom_components/sensor directory, home assistant will no longer restart or check my config file. Do I add the python file and add the hue sensor in my config at the same time?


#552

I don’t think you’re doing anything wrong. This was my experience too — clicks were often ignored.

I’ve reverted to using the regular Hue app for click events (to turn lights on/off/dim/brighten) and I still use this for hold events, because HA has no problem registering those, and it’s something the Hue app doesn’t support.


#553

For what it is worth, having watched what happens to the remotes in HA, I see that the click events appear only very, very briefly, followed consistently by click_up. I have set my automations on the click_up state and it works consistently everywhere.


#554

yeah… problem is I don’t use only Hue lights so I was using those to turn on scenes…
I really thought I found the perfect remote at this price, giving 8 possible buttons. I’ll look into testing something else, z-wave maybe, not sure…
The Aeotec Aeon Labs Wallmote Quad ZW130-A seems great but the price is just ridiculous… I find it weird you can get a Google Home Mini at 30$ on sale (can you so much with it) but, besides this remote, need to pay at least double to get buttons…

Hope this is something that can be resolved in the future…


#555

Hi, I am new to HA (coming from Domoticz) and really like the platform and its community.
I am now setting up my HA environment but struggle with the Hue Motion Sensor. I already have the Hue Lights running using the discovery component. Now I want to do some automation with the sensor, but I can’t get it running. I have tried a lot of things, read through the forum, but I am now out of options. Maybe I need to go to the REST platform in order to use my hue sensor.
When I insert the following in my configuration.yaml the configuration.yaml does not pass the validator anymore.

 sensor:
  - platform: hue
    ip_address: 192.168.2.15
    token: ##token## 

Running HA on RPI3+. I am at version 0.84.1 of HA and using the latest hue.py which I have put in the custom_components/sensor folder. I have a couple of questions:

  • why is the configuration file no longer valid if I include the hue sensor?
  • does the hue custom component work in combination with the discovery component?
  • do you need to use the same API key as is created for the discovery component?
  • do I need to insert also the hue bridge in my configuration file?
hue:
  bridges:
    - host: 192.168.2.15
  • I don’t see any hue entities in the state view (developer tools). Where do I look for these hue entities? I have not yet added the hue entities in the front end display since I first need to find out the naming of these entities.

Hope that somebody can point me in the right direction.