adapt espwater
This commit is contained in:
@@ -3,23 +3,25 @@ esphome:
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
# password: "feelhome123"
|
||||
encryption:
|
||||
key: "pIj3rhf93C6iBLqk+rshFHkUed0bdJhtD1iE6pWkeUE="
|
||||
password: !secret api_secret
|
||||
|
||||
ota:
|
||||
platform: esphome
|
||||
# password: !ota_key
|
||||
password: "5h4554h5x4th5x4d"
|
||||
|
||||
wifi:
|
||||
ssid: "lauIOT"
|
||||
password: "superiot1"
|
||||
domain: .home.cabestan.be
|
||||
ssid: !secret wireless_ssid
|
||||
password: !secret wireless_key
|
||||
domain: !secret wireless_domain
|
||||
|
||||
ap:
|
||||
ssid: "Espwater Fallback Hotspot"
|
||||
password: "jTlMOFiFOzog"
|
||||
ssid: "ESPwater_Fallback"
|
||||
password: !secret ap_secret
|
||||
|
||||
captive_portal:
|
||||
|
||||
@@ -34,13 +36,19 @@ mqtt:
|
||||
# password: sala45224
|
||||
password: r5h4r65h4
|
||||
on_message:
|
||||
topic: espwater/set_total_drop
|
||||
- topic: espwater/set_total_drop
|
||||
qos: 0
|
||||
then:
|
||||
lambda: |-
|
||||
// sprintf(id(lcd_line1),"|%s|%u|",x.c_str(),atol(x.c_str()));
|
||||
id(drops_absolute) = atol(x.c_str())*4;
|
||||
sprintf(id(lcd_line1),"Set Total:%lu",id(drops_absolute)/4);
|
||||
- topic: espwater/set_today_drop
|
||||
qos: 0
|
||||
then:
|
||||
lambda: |-
|
||||
id(drops_today) = atol(x.c_str())*4;
|
||||
|
||||
|
||||
globals:
|
||||
# - id: software_version
|
||||
@@ -146,6 +154,9 @@ sensor:
|
||||
lambda: |-
|
||||
return id(drops_absolute)/4;
|
||||
update_interval: 60s
|
||||
device_class: "water"
|
||||
unit_of_measurement: "L"
|
||||
state_class: total_increasing
|
||||
- platform: template
|
||||
id: template_water_today
|
||||
name: "Water Today Liters"
|
||||
@@ -153,6 +164,8 @@ sensor:
|
||||
return id(drops_today)/4;
|
||||
update_interval: 60s
|
||||
state_class: measurement
|
||||
device_class: "water"
|
||||
unit_of_measurement: "L"
|
||||
#last_reset: 1970-01-01T00:00:00+00:00
|
||||
|
||||
binary_sensor:
|
||||
|
||||
Reference in New Issue
Block a user