untill now use the following great custom_component https://github.com/robmarkcole/Hue-remotes-HASS from @robmarkcole to use my Friends of Hue switches (like this one from ABB Busch-Jaeger as remote to control automations in HA (e.g. stop HA automations manually with the foh switch in a room). The Friend of hue switchs are shows in the HUE integration as device but not as entity, so that is per now impossible to use this for automations in HA. I hope it is planed to support this remotes in the riginal HUE integration because the seperate custom_component are now has been archived and seperat ways to adress de hue gatway could cause in diverent timing problems.
here one example for what i use the FoH Switch as remote in HA:
#############################################################
# livingroom automation OFF if FOH switch lower-right pressed
#############################################################
- id: foh-swich-wohnzimmer-automation-off
alias: Automatisierung Wohnzimmer aus
trigger:
- platform: state
entity_id: remote.wohnzimmer_2
to: 'right_lower_press'
- platform: state
entity_id: remote.wohnzimmer_sofa
to: '4_click'
action:
- service: automation.turn_off
entity_id: automation.bewegungssensor_wohnzimmer_licht_an_nacht, automation.bewegungssensor_wohnzimmer_licht_an_tag, automation.bewegungssensor_wohnzimmer_radio_an
- service: media_player.volume_set
data:
entity_id: media_player.radio_wohnzimmer
volume_level: 0.3
- service: notify.alexa_media
data:
data:
type: announce
target:
- media_player.radio_wohnzimmer
message: 'Die Automatisierungen im Wohnzimmer wurden für 6 Stunden unterbrochen'
- service: light.toggle
entity_id: light.wohnzimmer_leselampe
- delay: 00:00:05
- service: light.toggle
entity_id: light.wohnzimmer_leselampe
- delay: 6:00:00
- service: automation.turn_on
entity_id: automation.bewegungssensor_wohnzimmer_licht_an_nacht, automation.bewegungssensor_wohnzimmer_licht_an_tag, automation.bewegungssensor_wohnzimmer_radio_an
#############################################################
# livingroom automation ON if FOH switch upper-right pressed
#############################################################
- id: foh-swich-wohnzimmer-automation-on
alias: Automatisierung Wohnzimmer an
trigger:
- platform: state
entity_id: remote.wohnzimmer_2
to: 'right_upper_press'
- platform: state
entity_id: remote.wohnzimmer_sofa
to: '1_click'
action:
- service: automation.turn_on
entity_id: automation.bewegungssensor_wohnzimmer_licht_an_nacht, automation.bewegungssensor_wohnzimmer_licht_an_tag, automation.bewegungssensor_wohnzimmer_radio_an
- service: media_player.volume_set
data:
entity_id: media_player.radio_wohnzimmer
volume_level: 0.3
- service: notify.alexa_media
data:
data:
type: announce
target:
- media_player.radio_wohnzimmer
message: 'Die Automatisierungen im Wohnzimmer wurden wieder aktiviert'
- service: light.toggle
entity_id: light.wohnzimmer_leselampe
- delay: 00:00:05
- service: light.toggle
entity_id: light.wohnzimmer_leselampe
While far from ideal, you can create device automations using the UI editor. Actually you can create device automations in yaml, it’s just not what they were intended for.
sorry but the problem is not the way to create automations but it is impossible to uses FoH and Hue Switches to controll HA function like start automation or other stuff.
The cration of automations over the GUI are good for the beginners but for special requests its more easy to make them direct in yaml files. For example you have a working automation that shot be copyed to other rooms or devices in yaml you could copy this and replace the entity ids. For me the gui are good if this and commenting the automation are possible before this is impossible ife use ge yaml file so long as i can
Sorry @tom_l you bring me in the right direction (y) Now i understand i see no entitys but it is possible to create an automation with the device over the UI.
for all other is is nessesary to create an automation over the UI to find out how the friend-of-hue could adress (device Ids are currently not in a spocken forms evailable) and after this you can use this device ID and the structure of command set in existing automations.
here the button assignment for the FoH Switches:
left upper = button_1
left lower = button_2
right uper = button_3
right lower= button_4
for example here the automation from above now with the FoH configuration with the Hue Integration and without seperate custom_component. like the component from @robmarkcole
One Problem by doing this is, if you have to disable and re enable the integration the DeviceIDs are changed and it is nessesary to determine the device IDs again and put those in all affected automations. This is a verry bad thing with the Device IDs in the automations instead of entity names.
Anyone having luck with the long press trigger? Short work ok, bit slow, but it works. Long press is unreliable and unusable for me.
For completeness, I’m using a Niko FoH EnOcean device, via the official Hue bridge and HA integration.