Skip to content

Commit

Permalink
naming total + add device class
Browse files Browse the repository at this point in the history
  • Loading branch information
mhendriks committed Mar 3, 2024
1 parent 947aa6e commit 2cfa18c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions p1-dongle-pro-h2o-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ substitutions:
device_name: p1-dongle-pro-h2o
device_description: "P1 Dongle Pro + H2O v2"
friendly_name: P1 Dongle Pro H2O
prj_version: "2024.02.01"
prj_version: "2024.02.02"

esphome:
name: ${device_name}
Expand Down Expand Up @@ -32,13 +32,7 @@ api:
then:
- pulse_meter.set_total_pulses:
id: h2o_pulse
value: !lambda 'return new_total;'

globals:
- id: totalWaterUsage
type: int
restore_value: true # aanpassen naar no indien de nieuwe waarde onder de oude ligt
initial_value: '0'
value: !lambda 'return new_total;'

ota:
captive_portal:
Expand Down Expand Up @@ -107,8 +101,9 @@ sensor:
icon: mdi:flash-outline
accuracy_decimals: 0
total:
name: "Water Total"
name: "Watermeter total"
state_class: total_increasing
device_class: "water"
icon: mdi:water
unit_of_measurement: L
accuracy_decimals: 0
Expand Down

0 comments on commit 2cfa18c

Please sign in to comment.