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

Add Text Sensors (#166)

* Text Sensors

* Add version text sensor

* Fix

* Fixes

* Add tests

* Add template text sensor

* Lint

* Fix test
This commit is contained in:
Otto Winter
2018-10-17 21:24:02 +02:00
committed by GitHub
parent b1f7ed4fdc
commit 75628b96a1
5 changed files with 153 additions and 0 deletions

View File

@@ -110,3 +110,20 @@ esp32_ble_beacon:
status_led:
pin: GPIO2
text_sensor:
- platform: version
name: "Esphomelib Version"
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());
- platform: mqtt_subscribe
name: "MQTT Subscribe Text"
topic: "the/topic"
qos: 2
- platform: template
name: "Template Text Sensor"
lambda: |-
return {"Hello World"};