esphome/tests/components/homeassistant/common.yaml
Landon Rohatensky a5fdcb31fc
[homeassistant] Native number entity import and control (#6455)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-08-14 14:04:12 +12:00

77 lines
1.8 KiB
YAML

esphome:
on_boot:
then:
- homeassistant.event:
event: esphome.button_pressed
data:
message: Button was pressed
- homeassistant.event:
event: esphome.html5
data:
message: New Humidity
data_template:
message: The humidity is {{ my_variable }}%.
variables:
my_variable: "return id(ha_hello_world_temperature).state;"
- homeassistant.action:
action: notify.html5
data:
message: Button was pressed
- homeassistant.action:
action: notify.html5
data:
title: New Humidity
data_template:
message: The humidity is {{ my_variable }}%.
variables:
my_variable: "return id(ha_hello_world_temperature).state;"
wifi:
ssid: MySSID
password: password1
api:
switch:
- platform: homeassistant
entity_id: switch.my_cool_switch
id: my_cool_switch
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
- platform: homeassistant
entity_id: binary_sensor.hello
attribute: world
id: ha_hello_world_binary_attribute
number:
- platform: homeassistant
entity_id: number.hello_world
id: ha_hello_world_number
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
- platform: homeassistant
entity_id: climate.living_room
attribute: temperature
id: ha_hello_world_temperature
text_sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world_text
- platform: homeassistant
entity_id: sensor.hello_world1
id: ha_hello_world_text2
attribute: some_attribute
time:
- platform: homeassistant
on_time:
- at: "16:00:00"
then:
- logger.log: It's 16:00