1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 14:43:51 +00:00

Add an action for pzemac to reset the total energy (#2480)

This commit is contained in:
Chris Nussbaum
2022-01-10 04:13:39 -06:00
committed by GitHub
parent f34b46a621
commit a0ea2aae6e
4 changed files with 49 additions and 0 deletions

View File

@@ -478,6 +478,7 @@ sensor:
power:
name: 'PZEM004T Power'
- platform: pzemac
id: pzemac1
voltage:
name: 'PZEMAC Voltage'
current:
@@ -776,6 +777,11 @@ binary_sensor:
on_press:
then:
- cover.toggle: time_based_cover
- platform: template
id: 'pzemac_reset_energy'
on_press:
then:
- pzemac.reset_energy: pzemac1
globals:
- id: my_global_string