periodic push

This commit is contained in:
2023-06-29 16:14:36 +02:00
parent c948b95622
commit 831f676068
267 changed files with 17705 additions and 10864 deletions

View File

@@ -1,19 +1,27 @@
substitutions:
esp_name: "esp32-75epaper-keuken"
device_name: "esp32-75epaper-keuken"
friendly_name: "Epaper display keuken"
comment: "7,5inch epaper displau keuken"
location: "Keuken"
api_password: !secret eink_display_api
ota_password: !secret ota_password
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
gateway: !secret ip_gateway
subnet: !secret ip_subnet
ip: !secret eink_display_ip
packages:
board: !include boards/esp32_wroom_arduino.yaml
connection: !include common/wifi_nosens.yaml
logger: !include templates/logger.yaml
esphome:
name: ${esp_name}
comment: ${esp_name}
name: ${device_name}
comment: ${comment}
friendly_name: ${friendly_name}
includes:
- common.h
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
- include/epaper75.h
external_components:
- source:
@@ -22,25 +30,6 @@ external_components:
ref: waveshare-color-2022.6
components: [waveshare_epaper]
# Enable Home Assistant API
api:
encryption:
key: !secret eink_display_api
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${esp_name} fallback
password: !secret fallback_password
#Include sun
sun:
latitude: !secret home_latitude
longitude: !secret home_longitude
@@ -198,7 +187,7 @@ font:
sensor:
- platform: template
name: "${esp_name} Last Update"
name: "${device_name} Last Update"
device_class: timestamp
id: display_last_update
@@ -210,66 +199,25 @@ sensor:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_temperature_0
id: weather_temperature_0
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_temperature_1
id: weather_temperature_1
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_temperature_2
id: weather_temperature_2
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_temperature_3
id: weather_temperature_3
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: travel_Best_time
id: travel_Best_time
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: travel_ASML_time
id: travel_ASML_time
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: travel_GGD_time
id: travel_GGD_time
on_value:
then:
- lambda: 'id(data_updated) = true;'
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_temperature_0, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_temperature_1, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_temperature_2, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_temperature_3, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_Best_time, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_ASML_time, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_euretco_time, entity_id: sensor.e_ink_display_data }}
- platform: wifi_signal
id: sensor_wifi_signal
name: "${esp_name} WiFi"
name: "${device_name} WiFi"
update_interval: 60s
on_value:
- component.update: sensor_wifi_signal_percentage
- platform: template
id: sensor_wifi_signal_percentage
name: "${esp_name} Wi-Fi Signal Percentage"
name: "${device_name} Wi-Fi Signal Percentage"
icon: "mdi:wifi"
unit_of_measurement: "%"
update_interval: never
@@ -287,7 +235,7 @@ sensor:
}
- platform: template
name: "${esp_name} Recorded Display Refresh"
name: "${device_name} Recorded Display Refresh"
lambda: 'return id(recorded_display_refresh);'
unit_of_measurement: "refreshes"
@@ -296,110 +244,21 @@ text_sensor:
entity_id: weather.forecast_home
id: weather_state
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_condition_now
id: weather_condition_now
on_value:
then:
- lambda: 'id(data_updated) = true;'
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_now, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_0, entity_id: sensor.e_ink_display_data}}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_timestamp_0, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_1, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_timestamp_1, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_2, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_timestamp_2, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_3, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_timestamp_3, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: afval_today, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: afval_tomorrow, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_Best_name, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_ASML_name, entity_id: sensor.e_ink_display_data }}
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_euretco_name, entity_id: sensor.e_ink_display_data }}
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_condition_0
id: weather_condition_0
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_timestamp_0
id: weather_timestamp_0
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_condition_1
id: weather_condition_1
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_timestamp_1
id: weather_timestamp_1
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_condition_2
id: weather_condition_2
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_timestamp_2
id: weather_timestamp_2
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_condition_3
id: weather_condition_3
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: weather_timestamp_3
id: weather_timestamp_3
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: afval_today
id: afval_today
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: afval_tomorrow
id: afval_tomorrow
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: travel_Best_name
id: travel_Best_name
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: travel_ASML_name
id: travel_ASML_name
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.e_ink_display_data
attribute: travel_GGD_name
id: travel_GGD_name
on_value:
then:
- lambda: 'id(data_updated) = true;'
- platform: homeassistant
entity_id: sensor.moon_phase
#attribute: icon
@@ -432,19 +291,19 @@ text_sensor:
- platform: wifi_info
ssid:
name: "${esp_name} Connected SSID"
name: "${device_name} Connected SSID"
id: ssid
icon: mdi:wifi-strength-2
entity_category: diagnostic
bssid:
name: "${esp_name} Connected BSSID"
name: "${device_name} Connected BSSID"
id: bssid
icon: mdi:wifi-strength-2
entity_category: diagnostic
mac_address:
name: "${esp_name} WiFi Mac Address"
name: "${device_name} WiFi Mac Address"
id: macaddress
icon: mdi:wifi-strength-2
entity_category: diagnostic
@@ -455,7 +314,7 @@ text_sensor:
type: sunrise
format: "%H:%M"
internal: true
update_interval: never
update_interval: 12h
- platform: sun
id: sunset
@@ -463,7 +322,7 @@ text_sensor:
type: sunset
format: "%H:%M"
internal: true
update_interval: never
update_interval: 12h
# Define colors
# This design is white on black so this is necessary.
@@ -502,7 +361,7 @@ display:
model: 7.50inv2b
#model: 7.50inv2
#model: 7.50inV2alt
update_interval: 1h
update_interval: 30min
id: eink_display
rotation: 90°
lambda: |-
@@ -619,8 +478,8 @@ display:
it.printf(drvtime_xoffset+210, drvtime_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(travel_ASML_name).state.c_str());
it.printf(drvtime_xoffset+210, drvtime_yoffset+30, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f min", id(travel_ASML_time).state);
it.printf(drvtime_xoffset+330, drvtime_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(travel_GGD_name).state.c_str());
it.printf(drvtime_xoffset+330, drvtime_yoffset+30, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f min", id(travel_GGD_time).state);
it.printf(drvtime_xoffset+330, drvtime_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(travel_euretco_name).state.c_str());
it.printf(drvtime_xoffset+330, drvtime_yoffset+30, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f min", id(travel_euretco_time).state);
it.line(30, drvtime_yoffset+60, 420, drvtime_yoffset+60);