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:
@@ -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"};
|
||||
|
Reference in New Issue
Block a user