core: Hue switches triggering automation by itself after first initial trigger

The problem

I press a button on my tap switch(connected by Hue bridge) and it does my normal automation. Some random time later it does the automation again.

I am not sure whats going on as my automation hasnt changed in months but I have updated HA and this has been happening since 2 updates ago. There has also been a auto update on my Hue Bridge.

My logbook is showing that the automation is starting again but I havn’t physically pressed the button again. Please keep in mind this automation worked fine for many many months.

It is also very strange strange how only the scripts trigger in the “fake” second button press. The automation runs as normal with the first button press so I am very confused and think this must have to do with the updates?

edit: I just did a test last night and this morning where when I trigger the automation via the UI. It works as intended so it must be the Hue Tap Switch that’s sending two presses for some reason.

What is version of Home Assistant Core has the issue?

core-2021.7.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

hue

Link to integration documentation on our website

https://www.home-assistant.io/integrations/hue/

Example YAML snippet

Automation:

alias: Bedroom Tap Switch - 1 - ALEXA "Start My Day"
description: ''
trigger:
  - device_id: 95f44d17d16441089c82c3e3b08b8f93
    domain: hue
    platform: device
    subtype: button_1
    type: remote_button_short_press
condition:
  - after: '04:00:00'
    before: '12:30:00'
    condition: time
action:
  - data:
      group_name: Automation
      scene_name: Day - Start
    service: hue.hue_activate_scene
  - device_id: d836cc4d2a5740c784d575cb9600f577
    domain: switch
    entity_id: switch.fan_smartplug
    type: turn_off
  - data: {}
    entity_id: script.bedroom_heater_on
    service: script.turn_on
  - data: {}
    entity_id: script.electric_blanket_on
    service: script.turn_on
  - service: script.turn_on
    data: {}
    entity_id: script.alexa_bedroom_tap_switch
  - data: {}
    entity_id: script.hvac_heat
    service: script.turn_on
  - data: {}
    entity_id: script.blinds_up
    service: script.turn_on
  - data: {}
    entity_id: script.notify_pushcut_dndoff
    service: script.turn_on
  - data:
      entity_id: input_select.home_status
      option: 'On'
    entity_id: input_select.home_status
    service: input_select.select_option
  - type: turn_off
    device_id: 7943010518ef4480aea8f3a04a0f0a8a
    entity_id: switch.kitchen_leds_smartplug
    domain: switch
  - delay: '00:03:00'
  - device_id: adc727a320394a629a19e6c597397f8d
    domain: switch
    entity_id: switch.electric_blanket_smartplug
    type: turn_off
  - delay:
      hours: 0
      minutes: 15
      seconds: 0
      milliseconds: 0
  - device_id: d4a6807056cd484a81802ece97dc0f6c
    domain: switch
    entity_id: switch.heater_smartplug
    type: turn_off
  - service: script.turn_on
    target:
      entity_id: script.hvac_auto_off
  - condition: state
    entity_id: input_select.home_status
    state: 'On'
  - condition: or
    conditions:
      - condition: device
        type: is_on
        device_id: bf6ec67630fe4fb7a8feb01ab3260887
        entity_id: light.bedroom_pendant
        domain: light
      - condition: device
        type: is_on
        device_id: 4dc257baf77940edb093148d5f1b7aab
        entity_id: light.bedroom_lamp
        domain: light
  - data:
      group_name: Bedroom - Main - ROOM
      scene_name: Bright
    service: hue.hue_activate_scene
mode: parallel
max: 10

One of the scripts that run randomly:

alias: HVAC - Heat
sequence:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_select.temperature_outside
            state: Cold
        sequence:
          - service: climate.set_hvac_mode
            data:
              hvac_mode: heat
            entity_id: climate.mitsubishi_hvac
          - service: climate.set_temperature
            data:
              temperature: 22.5
            entity_id: climate.mitsubishi_hvac
      - conditions:
          - condition: or
            conditions:
              - condition: state
                entity_id: input_select.temperature_outside
                state: Warm
              - condition: time
                after: '10:30'
        sequence:
          - choose:
              - conditions:
                  - condition: state
                    entity_id: input_select.home_status
                    state: 'On'
                sequence:
                  - service: notify.alexa_media_alexa_sonos_beam
                    data:
                      data:
                        type: tts
                      message: >-
                        Weather outside is warmer than inside - Open the sliding
                        door or trigger with Alexa
              - conditions:
                  - condition: state
                    entity_id: input_select.home_status
                    state: Standby
                sequence:
                  - service: notify.alexa_media_echo_spot
                    data:
                      data:
                        type: tts
                      message: >-
                        Weather outside is warmer than inside - Open the sliding
                        door or trigger with Alexa
            default: []
    default: []
mode: single

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 54

Most upvoted comments

Same problem here.

Log files show that a power state event is received:

2021-07-27 15:52:17 DEBUG (MainThread) [aiohue.bridge.xxx.xxx.xxx.xxx] Received event: {'creationtime': '2021-07-27T14:52:17Z', 'data': [{'id': '91f648c6-4849-4f3c-bfc1-0e2f6ef31413', 'id_v1': '/sensors/15', 'power_state': {'batter
y_level': 79, 'battery_state': 'normal'}, 'type': 'device_power'}], 'id': 'a7541726-6752-40dd-b335-aef830b65c9f', 'type': 'update'}
2021-07-27 15:52:17 INFO (MainThread) [homeassistant.components.automation.hue_remote_2_office_button_2_short_press_office_lamp] Hue Remote 2 (Office) - Button 2 - Short Press - Office Lamp: Running automation actions
2021-07-27 15:52:17 INFO (MainThread) [homeassistant.components.automation.hue_remote_2_office_button_2_short_press_office_lamp] Hue Remote 2 (Office) - Button 2 - Short Press - Office Lamp: Executing step device automation

However, HA triggers a a button press event instead, and any automations associated with that button press are triggered. The button press event triggered will be which ever the last button press that was used on that remote.

How can I raise the log levels?

That’s configured in the logger integration: https://www.home-assistant.io/integrations/logger/

See my comment above for an example with aiohue.

I had to buy a New Pi and power supply and all is working fine. I think my Pi was getting old or something but now it’s all fine