dingz buttons - johannrichard/homebridge-dingz GitHub Wiki

dingz buttons: where is my flip switch?

Stateful Programmable Switches (i.e. "flip switches") are not anymore exposed in HomeKit. However, the "ProgrammableSwitchOutputState" Characteristic added to a "StatelessProgrammableSwitch" (i.e. a push button), can be read out -- and used -- by third-party apps for HomeKit. This allows advanced users to create automations not only based on the button events, but also based on a state that's toggled with each (single) press of the button.

In order to make use of this feature, you must install one of the many third-party HomeKit apps and create automations based on the "ProgrammableSwitchOutputState". This will allow you, for example, to assign one automation to the "ON" (1) and one automation to the "OFF" (0) state which in turn can turn on or off whatever Lights, Fans, or other "switchable" accessories in HomeKit.

dingz Accessory Properties

The following is a screenshot from the "Home Plus" app, other apps might look similar:

Besides the Button Event properties which will be exposed in Home as Push Buttons, you see the "Output State" property which can either be 0 or 1.

![dingz Output States](https://raw.githubusercontent.com/wiki/johannrichard/homebridge-dingzimages/dingz Output States.png)

Flip-Switch Automation

By creating two automations (for "ON" and "OFF") and assignin these to the accessories / scenes you want to toggle, you can then implement a "flip-switch" behaviour, despite HomeKit itself not exposing these:

![dingz ON Automation](https://raw.githubusercontent.com/wiki/johannrichard/homebridge-dingzimages/dingz Flip-switch ON.png)

Flip-switch "ON"

![dingz OFF Automation](https://raw.githubusercontent.com/wiki/johannrichard/homebridge-dingzimages/dingz Flip-switch OFF.png)

Flip-switch "ON"

![dingz Automation](https://raw.githubusercontent.com/wiki/johannrichard/homebridge-dingzimages/dingz Flip Switch Automation.png)

ON/OFF Automations