mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
Add mqtt.on_connect and mqtt.on_disconnect triggers (#3520)
This commit is contained in:
@@ -168,6 +168,13 @@ mqtt:
|
||||
id: uart0
|
||||
data: !lambda |-
|
||||
return {};
|
||||
on_connect:
|
||||
- light.turn_on: ${roomname}_lights
|
||||
- mqtt.publish:
|
||||
topic: some/topic
|
||||
payload: Hello
|
||||
on_disconnect:
|
||||
- light.turn_off: ${roomname}_lights
|
||||
|
||||
i2c:
|
||||
sda: 21
|
||||
|
||||
Reference in New Issue
Block a user