1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

Add update component action and scripts (#196)

* Add update component action

* Add script component
This commit is contained in:
Otto Winter
2018-10-20 12:58:02 +02:00
committed by GitHub
parent 629f2b128e
commit 34fc2147a4
3 changed files with 62 additions and 3 deletions

View File

@@ -124,8 +124,9 @@ text_sensor:
icon: mdi:icon
id: version_sensor
on_value:
lambda: |-
ESP_LOGD("main", "The value is %s=%s", x.c_str(), id(version_sensor).value.c_str());
- lambda: |-
ESP_LOGD("main", "The value is %s=%s", x.c_str(), id(version_sensor).value.c_str());
- script.execute: my_script
- platform: mqtt_subscribe
name: "MQTT Subscribe Text"
topic: "the/topic"
@@ -134,3 +135,8 @@ text_sensor:
name: "Template Text Sensor"
lambda: |-
return {"Hello World"};
script:
- id: my_script
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'