Add WiFi/MQTT/API connected condition (#465)
* Add WiFi/MQTT/API connected condition * Add tests * Fix namespace
This commit is contained in:
@@ -185,8 +185,12 @@ text_sensor:
|
||||
icon: mdi:icon
|
||||
id: version_sensor
|
||||
on_value:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("main", "The state is %s=%s", x.c_str(), id(version_sensor).state.c_str());
|
||||
- if:
|
||||
condition:
|
||||
- api.connected:
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
ESP_LOGD("main", "The state is %s=%s", x.c_str(), id(version_sensor).state.c_str());
|
||||
- script.execute: my_script
|
||||
- homeassistant.service:
|
||||
service: notify.html5
|
||||
|
||||
Reference in New Issue
Block a user