Do takiego powiadomienia wykorzystuję .Wymaga to na zasilaniu licznika dwu kierunkowego zintegrowanego z HA .
Jest to wtyczka która zlicza bilansowanie godzinowe między fazowe czyli
Utworzyłem pomocnika.
dwie automatyzacje
alias: energia 0/1
description: ""
mode: single
triggers:
- entity_id:
- sensor.energia_bilans_netto
above: 0
trigger: numeric_state
conditions: []
actions:
- action: input_select.select_option
metadata: {}
data:
option: Use energy
target:
entity_id: input_select.energy_0_1
- action: notify.android_tv
metadata: {}
data:
message: Zalecane używanie
title: Use energy
data:
duration: 7
transparency: 55%
icon:
path: /media/ha.png
alias: energia1/0
description: ""
triggers:
- entity_id:
- sensor.energia_bilans_netto
below: 0
trigger: numeric_state
conditions:
- condition: state
entity_id: input_select.energy_0_1
state: Use energy
for:
hours: 0
minutes: 10
seconds: 0
actions:
- action: input_select.select_option
metadata: {}
data:
option: Save energy
target:
entity_id: input_select.energy_0_1
- action: notify.android_tv
metadata: {}
data:
message: Zalecane oszczędzanie
title: Save energy
data:
duration: 4
transparency: 55%
icon:
path: /media/ha.png
mode: single
przy okazji automatyzacja ta wysyła powiadomienie na telewizor z androidem
Notifications for Android TV / Fire TV - Home Assistant
dodatkowo w kuchni ma wyświetlacz na ESPHome
https://youtube.com/shorts/jvnQwlb7mSY?si=hHVU9NwRVERVi11b
esphome:
name: "wyswietlacz"
esp8266:
board: d1_mini
framework:
version: recommended
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "pihTkDrpuE3BSqFHagILJHX+1ZBQxh97jMuZq3JO6gw="
ota:
platform: esphome
password: "6a8a2862e42cda9efc05d828cfd2be97"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.50.10
gateway: 192.168.50.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Wywietlacz Fallback Hotspot"
password: "o3G9trb9L5da"
captive_portal:
i2c:
sda: D3
scl: D4
scan: False
font:
- file: 'Roboto-Italic.ttf'
id: font1
size: 20
- file: 'Ubuntu-Regular.ttf'
id: font2
size: 20
- file: 'Ubuntu-Regular.ttf'
id: font3
size: 15
- file: 'led.ttf'
id: font4
size: 40
time:
- platform: homeassistant
id: esptime
sensor:
- platform: homeassistant
entity_id: sensor.moc_l1_l2_l3
id: Mocl13
internal: true
accuracy_decimals: 1
unit_of_measurement: "W"
device_class: "power"
state_class: "measurement"
- platform: homeassistant
entity_id: sensor.sonoffbasic_ds_multi_out
id: tempzew
internal: true
accuracy_decimals: 2
unit_of_measurement: "°C"
device_class: "temperature"
state_class: "measurement"
- platform: homeassistant
entity_id: sensor.temp_dom
id: poktv
internal: true
accuracy_decimals: 2
unit_of_measurement: "°C"
device_class: "temperature"
state_class: "measurement"
- platform: homeassistant
entity_id: sensor.temperature_max
id: maxout
internal: true
accuracy_decimals: 2
unit_of_measurement: "°C"
device_class: "temperature"
state_class: "measurement"
text_sensor:
- platform: homeassistant
name: "Energy 0/1"
entity_id: input_select.energy_0_1
id: energy
display:
- platform: ssd1306_i2c
model: "SH1106 128x64"
update_interval: 2s
address: 0x3C
reset_pin: D0
rotation: 180
id: my_display
pages:
- id: page1
lambda: |-
it.printf(50, 40, id(font2), "%.fW", id(Mocl13).state);
it.printf(0, 0, id(font3), "%s", to_string(id(energy).state).c_str());
- id: page2
lambda: |-
it.print(0, 0, id(font3), "In: ");
it.printf(0, 40, id(font3), "%.1f°C", id(poktv).state);
it.line(54, 0, 54, 80);
it.print(65, 0, id(font3), "Out: ");
it.printf(70, 20, id(font1), "%.1f°C", id(tempzew).state);
it.printf(75, 47, id(font3), "%.1f°C", id(maxout).state);
- id: page3
lambda: |-
it.strftime(5, 0, id(font4), "%H:%M", id(esptime).now());
it.strftime(5, 40, id(font2), "%d:%b:%Y", id(esptime).now());
#it.strftime(70, 40, id(font1), "%A", id(esptime).now());
interval:
- interval: 5s
then:
- display.page.show_next: my_display
- component.update: my_display