nfarina / homebridge-dummy

Dummy switches for Homebridge: https://github.com/nfarina/homebridge
277 stars 83 forks source link

Toggle State of a selected accessory or scene? #21

Open scooter133 opened 4 years ago

scooter133 commented 4 years ago

I’m not sire if this is something to add to this plugin or to have as a separate plugin. I want to have an automation where if I press a button and the accessory is on, turn its off, if its off, turn it on. But since automations are lacking in that area, I through the that would be a great option for this accessory.

config.json:

  "accessories": [
        {
          "accessory": "DummySwitch",
          "name": "My Toggle Switch 1",
          "toggle": true
        }   
    ]

In Homekit allow it to select an accessory(ies)/Scene.

raphtabe commented 4 years ago

Therefore, you juste need to configure a automation with a shortcut action. It allows to include conditions (if then else).