Feature/wemo power energy
Im not convinced in the energy meter reporting of this device at all, in fact it may be worthwhile to only report powerMeter capabilities for the device since it is very inconsistent in its values for energy reports (total energy fluctuates a lot including negative values, and it seems very high)
This implementation is based off the way device report payloads are interpreted here and here
Invitation URL: https://bestow-regional.api.smartthings.com/invite/Q1jP5gB9ZMLd
Test Results
52 files 333 suites 0s :stopwatch: 1 576 tests 1 576 :heavy_check_mark: 0 :zzz: 0 :x: 2 699 runs 2 699 :heavy_check_mark: 0 :zzz: 0 :x:
Results for commit eb038888.
Minimum allowed coverage is 90%
Generated by :monkey: cobertura-action against eb038888bdee2a306aee0dbcdc203037bb913a30
Due to the weird energy reports I have gotten from the device I see a few options to move this PR forward:
- Remove energyMeter cap from the insight devices
- Leave it in there as it is now, but implement a profile switch based on a preference value, so that users can opt into the energy reporting, which is somewhat suspect
- Implement energy reporting in software. The
energy_today_Whfield that is reported seems to be accurate and could be used to keep a running total for the device and periodically emit that total. This would also allow for resetting of the energyMeter since we control the total rather than the device - Implement the powerConsumptionReport capability instead. This sort of seems like option 3 but the capability is setup for it. Although, I am not sure how accurate all the fields are that would be needed from the device, and if the device is actually resetting the energy totals daily.
Since I suggested it, I'm most partial to option 2.