1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-13 08:28:19 +00:00
2025-02-12 08:51:55 +13:00

141 lines
2.5 KiB
YAML

substitutions:
verify_ssl: "false"
esphome:
name: livingroomdevice
friendly_name: Living Room Device
area: Living Room
on_boot:
then:
- if:
condition:
update.is_available:
then:
- logger.log: "Update available"
- update.perform:
force_update: true
wifi:
ssid: MySSID
password: password1
http_request:
verify_ssl: ${verify_ssl}
ota:
- platform: http_request
update:
- platform: http_request
name: Firmware Update
source: http://example.com/manifest.json
sensor:
- platform: template
id: template_sensor1
lambda: |-
if (millis() > 10000) {
return 42.0;
} else {
return 0.0;
}
update_interval: 60s
text_sensor:
- platform: version
name: "ESPHome Version"
hide_timestamp: true
- platform: template
id: template_text_sensor1
lambda: |-
if (millis() > 10000) {
return {"Hello World"};
} else {
return {"Goodbye (cruel) World"};
}
update_interval: 60s
binary_sensor:
- platform: template
id: template_binary_sensor1
lambda: |-
if (millis() > 10000) {
return true;
} else {
return false;
}
switch:
- platform: template
id: template_switch1
lambda: |-
if (millis() > 10000) {
return true;
} else {
return false;
}
optimistic: true
fan:
- platform: template
id: template_fan1
cover:
- platform: template
id: template_cover1
lambda: |-
if (millis() > 10000) {
return COVER_OPEN;
} else {
return COVER_CLOSED;
}
lock:
- platform: template
id: template_lock1
lambda: |-
if (millis() > 10000) {
return LOCK_STATE_LOCKED;
} else {
return LOCK_STATE_UNLOCKED;
}
optimistic: true
select:
- platform: template
id: template_select1
name: "Template select"
optimistic: true
options:
- one
- two
- three
initial_option: two
number:
- platform: template
id: template_number1
name: "Template number"
optimistic: true
min_value: 0
max_value: 100
step: 1
valve:
- platform: template
name: "Template Valve"
lambda: |-
return VALVE_OPEN;
optimistic: true
has_position: true
prometheus:
include_internal: true
relabel:
template_sensor1:
id: hellow_world
name: Hello World
template_text_sensor1:
id: hello_text
name: Text Substitution