anklimov / lighthub

Flexible, Arduino Mega/Due/ESP8266/ESP32/STM32 based SmartHome controller with DMX-512 in/out, 1-Wire, Modbus, MQTT interfaces. OpenHab/HomeAssistant/ioBroker compatible.
https://lazyhome.ru
Apache License 2.0
97 stars 23 forks source link

Add button support as input #29

Closed MykhailoKh closed 6 years ago

MykhailoKh commented 6 years ago

Push buttons are useful for home automation. You can connect a lot of them on one line. Currently IN_PUSH_TOGGLE was not used in code. I've checked - behaviour is the same if you use 0 or 1 as input type. I keep type "0" as normal button as before. Type "1" becomes a push button which toggle state on every press i.e. on every change 0-1 and back.