I’m using a D1mini connected to MCP23017 GPIO extender to control 8 channel relay along with switches. I’m trying to assign a ESPHome momentary switch (binary_sensor) to a light. I’ve created binary sensor to toggle the light, and wanted to increase the brightness to 100% by long press the button. Below is my config
I haven’t thought about scenes. Good idea. I’ll try.
So, I can’t add more than one line of service data in esphome yaml? If I remove the brightness, it shows valid.
you cann add multiple, check my code (its nothing final btw im still playing around)
Edit: be warned: there’s no scene.turn_off - you can only turn them on. I usually just made scenes with the opposite values that I can turn on to achieve that.
I can’t able to validate the code with 2 lines. Asked for a close loop, so, mentioned } next to brightness, code accepted, but function not working as there is no open {.
I don’t know json coding, so it’s just trial and error method.