Smart Plugs v2 and v3 - Add Energy Statistics Component #70
Replies: 2 comments 1 reply
-
@tarontop could you please advise upon this (and PULL for them if interested) ? |
Beta Was this translation helpful? Give feedback.
-
Updated to :
@athom-tech @tarontop Aiden, As your supporting this product, diving into these threads and commenting would be appreciated. |
Beta Was this translation helpful? Give feedback.
-
Hi @athom-tech / Aiden,
Have you looked at utilising the Energy Statistic component ( https://github.com/dentra/esphome-components/tree/master/components/energy_statistics ), that allows tracking Energy usage for Today, Yesterday, Week and Month on the Smart Plugs ?
As it currently stands, they use the standard ESPHome components for this that are rather less than useful, giving an Energy and Energy Total sensor, but lacking any timeframe to which they refer. i.e. The Energy sensor resets to zero whenever the plug is reflashed, rebooted etc, whilst the Total Energy sensor is just a running total since ??? (sometimes resets when flashed, or else does anyone remember when it last reset or was first used?).
Instead of that the Energy Statistics component provides for Energy sensors that give a clear timeframe of how much energy was used for a specific timeframe. Also in conjunction with HomeAssistant, these sensors also mean that a user ends up with a clear History records of the Energy consumption for each plug, showing usage for every day, week and month going back to when the plug was added (with this enhanced component). Previously they only way to do this would be to manually write a yaml configuration for each plug in HomeAssistant, that then uses the utility_meter component to run utility meters for each plug and for each time period.
Here is a v3 plug (works the same on my v2 plugs) running the Energy Statistic component. FYI the interface is webserver version 3 (instead of default v2), as v3 also allows the option to manually define the sort order of each sensor (instead of the old game of having to think up names for sensors, that made sense and also alphabetically sorted them in the order desired).
Please let me know your thoughts, as I can create a PULL for this functionality. Be interested in your thoughts also of moving from webserver v2 to v3, that also adds the abilty to click on the sensors and have them expand to show the last 5min or so of readings (handy when trying to trouble shoot power etc issues and actually see what is happening.
Beta Was this translation helpful? Give feedback.
All reactions