Skip to content

Commit

Permalink
Add reset service (#73)
Browse files Browse the repository at this point in the history
Add a service to reset total consumption from HA.
  • Loading branch information
Yegor Vialov authored Oct 26, 2021
1 parent 9683946 commit 8f9a669
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions home_assistant_glow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ logger:
# Enable Home Assistant API
api:
password: !secret esphome_api_password
services:
- service: reset_total
then:
- pulse_meter.set_total_pulses:
id: energy_pulse_meter
value: 0

ota:
safe_mode: true
Expand Down Expand Up @@ -90,6 +96,7 @@ text_sensor:

sensor:
- platform: pulse_meter
id: energy_pulse_meter
name: '${friendly_name} - Power consumption'
unit_of_measurement: 'W'
state_class: measurement
Expand Down

0 comments on commit 8f9a669

Please sign in to comment.