Might be a simple question but several searches and no luck?
I have a Sonoff basic with the latest Tasmota.
I use the main relay to control a coffee machine. I have attached a led illuminated external switch on GPIO 14 in switchmode 9 (toggle) and are illuminating the switch with PMW power from GPIO 3 in PMW1 mode (37)
The main relay is called Power1 and the light in the switch is called Power2.
How can I control the brightness in the button to be at 30 % during the dark hours, 60 % during the bright hours and 100% when the Power1 relay is in “ON” mode?
I can adjust the brightness of the LED in the button by a slider in the Tasmota web-interface but I would like it to be controlled by action in MQTT.
Some info of the setup:
14:23:13 MQT: tele/Kaffe/STATE = {“Time”:“2020-03-21T14:23:13”,“Uptime”:“0T02:20:13”,“UptimeSec”:8413,“Heap”:28,“SleepMode”:“Dynamic”,“Sleep”:10,“LoadAvg”:99,“MqttCount”:1,“POWER1”:“OFF”,“POWER2”:“ON”,“Dimmer”:67,“Fade”:“OFF”,“Speed”:1,“LedTable”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“network”,“BSSId”:“A0:XG:BF:6C:7C:55”,“Channel”:11,“RSSI”:90,“Signal”:-55,“LinkCount”:1,“Downtime”:“0T00:00:06”}}
14:23:13 MQT: tele/Kaffe/SENSOR = {“Time”:“2020-03-21T14:23:13”,“Switch1”:“ON”}
- platform: mqtt
name: “Kaffe”
state_topic: “stat/Kaffe/POWER1”
command_topic: “cmnd/Kaffe/POWER1”
availability_topic: “tele/Kaffe/LWT”
qos: 1
payload_on: “ON”
payload_off: “OFF”
payload_available: “Online”
payload_not_available: “Offline”
retain: false
icon: mdi:coffee
How do I go about telling the system that the Power2 is a light with brightness adjustability?
I have tried a few “lights” configurations, but no luck so far?