-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Eve] Improve Eve Energy support #940
[Eve] Improve Eve Energy support #940
Conversation
- A subdriver has been implemented - It implements the switch, powerMeter, energyMeter and powerConsumptionReport capabilities - It supports the refresh capability - It reads with a timer each minute the current Watt and Watt Accumulated values from custom attributes - The powerMeter and energyMeter values are updated each values or on a refresh - A powerConsumptionReport is sent each 10 minutes by comparing the previous Watt Accumulated value with the current Watt Accumulated value
…one in the base driver
Duplicate profile check: Passed - no duplicate profiles detected. |
Channel deleted. |
Minimum allowed coverage is Generated by 🐒 cobertura-action against c80f08e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd like to see some tests written for these changes.
I added the file The function
|
@Timac I believe you'd want to use
Similarly to how it is used in this zigbee test: https://github.com/SmartThingsCommunity/SmartThingsEdgeDrivers/blob/main/drivers/SmartThings/zigbee-contact/src/test/test_zigbee_contact.lua#L141 And then, you'd want to queue up |
…erly set up when the device is added
… triggers the function requestData(). This function will read the standard and custom attributes from the device.
That worked. Thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
…f every 10 minutes
…to reset the energy meter
- Add safety check in case os.time() returns a value before 2001 which could be the cases in unit tests
These changes improve the Eve Energy support