Biggi
(Birgir Ragnarsson)
July 26, 2022, 10:38pm
1
I decided to try out Shelly smart switches. I set up all the switches in home assistant and now im trying to set it up so i can press the button (that controls the light by the front door) 3 times and it will turn off all the lights in the house. is this possible? and if so could someone point me in the right direction to figure this out.
Thanks
zoogara
(Daryl)
July 27, 2022, 12:11am
2
See Automations in the Shelly integration. If your button supports triple click it appears to be fairly straightforward.
Set up an automation with a trigger for triple clicked, then the automation action would be:
- service: light.turn_off
entity_id: all
rodw
(Rod Webster)
July 27, 2022, 11:07am
3
There is a blueprint that does this nicely
ha-mqtt-shelly-1pm-toggle.yaml
blueprint:
name: MQTT - Shelly 1PM Toggle Switch
description: Trigger actions with a Shelly 1PM's switch from MQTT (used in Toggle or Detached mode). Remember to set your Shelly 1PM to MQTT mode, and point it (and Home Assistant) to your MQTT broker.
domain: automation
input:
shelly_button_id:
name: "Shelly 1PM Device ID"
description: "The Device ID of the Shelly 1PM. Can be found on the web interface of the Shelly 1PM under 'Settings -> Device Info'. (Eg.: XXXXXXXXXXXX)"
selector:
This file has been truncated. show original
triple_press:
- type: turn_off
device_id: d28f6d39e45765d480a6be0185f0ad59
entity_id: light.lifx_mini_309c01
domain: light