Change button type from within Home Assistant

  • Hi all,

    I wonder if there is a way to change the button type (one, dual, edge, detached) from Home Assistant, e.g. using an automation.

    Reason I am asking is because I had thought off a funny idea in case anybody decided to break into my house.

    I was thinking of switching on all lights that are controlled by Shellies as soon as e.g. a door sensor gets triggered. Once all the lights are on (and maybe some more things like all Squeezeboxes playing some welcome message for the intruder) I would then like to deactive the funtionality of the light switches by setting them to DETACHED. :S

    My natural behavior as a burglar would be to try to switch off the lights as quickly as possible but if non of the buttons work that must be frustrating and at least at night might not be so helpful to search through the house in peace. :cursing:

    Would that be possible?

    Thanks,

    Shellhammer

  • Cool idea,

    You would have to put the HTTP command there for each shelly via rest_command. Like http://192.168.xxx.xxx/settings/relay/0?btn_type=momentary (customize) then you can use this in an automation.

    So I rebooted all my Shelly Plus PM at once.

    Must create that of course also again, so that you can switch again.

    Better make one first, should work.

    Greetings Andreas

    8)

    Shelly’s: 2x 1, 10x 1PM , 4x 2.5, 3x i3, 10x Plus 1PM, 22x Plug S, 11x UNI, 2x 1L mit PIR, 8x AddOn mit Temp/DHT22, 3x RGBW2, 2x Plus i4, 5x Plus 1, 4x Plus 2PM, 4x EM, 2x 3EM, 1x TRV, 3x Plus AddOn, 1x Pro 3EM, 2x BLU, 5xPlusPMmini, 1xPlus1PMmini, 4xPlusUNI

    Fritz!Box5690pro, 3x FRITZ!Repeater6000, 6x Fritz!Dect200

    HomeAssistant auf RaspberryPi5(8GB) mit NVMe, HomeAssistant auf Synology DS1019+, Backup HomeAssistant auf RaspberryPi4B(4GB)

    DHT21 (AM2301) oder (AM2320) für unter 0 Grad

  • Here example reboot

    Code: configuration.yaml
    # reboot plus alle
      reboot_plus_eing:
        url: "http://192.168.178.163/rpc/Shelly.Reboot"

    and than here

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    Have fun

    Shelly’s: 2x 1, 10x 1PM , 4x 2.5, 3x i3, 10x Plus 1PM, 22x Plug S, 11x UNI, 2x 1L mit PIR, 8x AddOn mit Temp/DHT22, 3x RGBW2, 2x Plus i4, 5x Plus 1, 4x Plus 2PM, 4x EM, 2x 3EM, 1x TRV, 3x Plus AddOn, 1x Pro 3EM, 2x BLU, 5xPlusPMmini, 1xPlus1PMmini, 4xPlusUNI

    Fritz!Box5690pro, 3x FRITZ!Repeater6000, 6x Fritz!Dect200

    HomeAssistant auf RaspberryPi5(8GB) mit NVMe, HomeAssistant auf Synology DS1019+, Backup HomeAssistant auf RaspberryPi4B(4GB)

    DHT21 (AM2301) oder (AM2320) für unter 0 Grad

    2 Mal editiert, zuletzt von apreick (18. Februar 2022 um 22:34)