1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

Merge branch 'dev' into mdns_value_flash

This commit is contained in:
J. Nick Koston
2025-10-07 22:23:27 -10:00
committed by GitHub
28 changed files with 1300 additions and 11 deletions

View File

@@ -10,6 +10,39 @@ esphome:
data:
message: Button was pressed
- homeassistant.tag_scanned: pulse
- homeassistant.action:
action: weather.get_forecasts
data:
entity_id: weather.forecast_home
type: hourly
capture_response: true
on_success:
- lambda: |-
JsonObjectConst next_hour = response["response"]["weather.forecast_home"]["forecast"][0];
float next_temperature = next_hour["temperature"].as<float>();
ESP_LOGD("main", "Next hour temperature: %f", next_temperature);
on_error:
- lambda: |-
ESP_LOGE("main", "Action failed with error: %s", error.c_str());
- homeassistant.action:
action: weather.get_forecasts
data:
entity_id: weather.forecast_home
type: hourly
capture_response: true
response_template: "{{ response['weather.forecast_home']['forecast'][0]['temperature'] }}"
on_success:
- lambda: |-
float temperature = response["response"].as<float>();
ESP_LOGD("main", "Next hour temperature: %f", temperature);
- homeassistant.action:
action: light.toggle
data:
entity_id: light.demo_light
on_success:
- logger.log: "Toggled demo light"
on_error:
- logger.log: "Failed to toggle demo light"
api:
port: 8000

View File

@@ -0,0 +1,15 @@
spi:
clk_pin: GPIO7
mosi_pin: GPIO9
display:
- platform: epaper_spi
model: 7.3in-spectra-e6
cs_pin: GPIO5
dc_pin: GPIO17
reset_pin: GPIO16
busy_pin: GPIO4
rotation: 0
update_interval: 60s
lambda: |-
it.circle(64, 64, 50, Color::BLACK);