I have custom Friends of Hue button device, which has four buttons. Each button has four possible options:
- Pressed immediately
- Held down
- Released after short press
- Released after long press
I have set button 1 to Play/Pause my Sonos device, when trigger is ‘3. Released after short press’.
I have also set button 1 to increase volume on my Sonos device, when trigger is ‘2. Held down’.
Both work, but the issue is, that when I release the button after ‘2. Held down’, this triggers the ‘Released after short press’ event, and pauses playback. As I am holding down the button for more than 2 seconds, I would expect it to trigger ‘4. Released after long press’, which does not trigger anything.
What am I missing / doing wrong?
Thanks
alias: Sonos Stuen Volume
description: ""
trigger:
- device_id: c736d74adc0f5ff327e28eafc8d123e3
domain: hue
platform: device
type: repeat
subtype: 1
unique_id: a7cd87ba-1dd3-4a70-a556-f2f0902672a9
id: Stuen Sonos Vol op
- device_id: c736d74adc0f5ff327e28eafc8d123e3
domain: hue
platform: device
type: repeat
subtype: 2
unique_id: bf5d9d3b-600f-4428-82ac-f150f6d1f6f9
id: Stuen Sonos Vol ned
- device_id: c736d74adc0f5ff327e28eafc8d123e3
domain: hue
platform: device
type: long_release
subtype: 1
unique_id: a7cd87ba-1dd3-4a70-a556-f2f0902672a9
id: Stuen Sonos Vol op release
- device_id: c736d74adc0f5ff327e28eafc8d123e3
domain: hue
platform: device
type: long_release
subtype: 2
unique_id: bf5d9d3b-600f-4428-82ac-f150f6d1f6f9
id: Stuen Sonos Vol ned release
- device_id: c736d74adc0f5ff327e28eafc8d123e3
domain: hue
platform: device
type: short_release
subtype: 1
unique_id: a7cd87ba-1dd3-4a70-a556-f2f0902672a9
id: Stuen Sonos Play/Pause
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Stuen Sonos Vol op
sequence:
- repeat:
while:
- condition: trigger
id: Stuen Sonos Vol op
sequence:
- service: media_player.volume_up
data: {}
target:
entity_id: media_player.stue
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 200
- conditions:
- condition: trigger
id: Stuen Sonos Vol ned
sequence:
- repeat:
while:
- condition: trigger
id: Stuen Sonos Vol ned
sequence:
- service: media_player.volume_down
data: {}
target:
entity_id: media_player.stue
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 200
- conditions:
- condition: trigger
id: Stuen Sonos Play/Pause
sequence:
- service: media_player.media_play_pause
data: {}
target:
entity_id: media_player.stue
mode: restart