mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 07:24:54 +01:00
Add homeassistant.service test
This commit is contained in:
parent
8a61c21051
commit
4f5389998f
1 changed files with 9 additions and 0 deletions
|
@ -202,6 +202,15 @@ text_sensor:
|
|||
- 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
|
||||
data:
|
||||
title: New Humidity
|
||||
data_template:
|
||||
message: The humidity is {{ my_variable }}%.
|
||||
variables:
|
||||
my_variable: |-
|
||||
return id(version_sensor).state;
|
||||
- platform: mqtt_subscribe
|
||||
name: "MQTT Subscribe Text"
|
||||
topic: "the/topic"
|
||||
|
|
Loading…
Reference in a new issue