Closed Roving-Ronin closed 2 months ago
You can try this first. I think it is not enough. You should also reset the energy on the metering chip register.
button:
- platform: template
name: Reset_Energy
entity_category: config
on_press:
then:
- globals.set:
id: id_Energy_1_persist
value: '0.0'
- globals.set:
id: id_Energy_2_persist
value: '0.0'
- globals.set:
id: id_Energy_3_persist
value: '0.0'
- globals.set:
id: id_Energy_4_persist
value: '0.0'
- globals.set:
id: id_Energy_5_persist
value: '0.0'
- globals.set:
id: id_Energy_6_persist
value: '0.0'
- globals.set:
id: id_Energy_sum_persist
value: '0.0'
Where / how can one access those registers 'on the chip'?
Looking at your code, it appears to be the same operations as I've got (resetting the global), but just formatted a different way.
Just got a moment to try the above code and whilst the log shows it triggered, it actually does nothing. Readings for Energy remain as they are (don't even momentarily change to zero and then back).
@tarontop @athom-tech
Could you PLEASE add in a button that allows resetting ALL the Energy sensors back to 0 ? All the usual methods I'm used to fail to work with the logs showing them reset, and then a second later the 'Energy_#_Internal' sensors then push their data back into the energy senors and restore the previous data that was wiped from them.
Try adding this and see for yourself.
LOGS:
Edit: Just even tried chaing the 'persist' Globals to 'restore_value: no'. Flashed it, hit the reset and the value STILL get restored.