Skip to content
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]: Support for Eve Energy Outlet #1195

Merged

Conversation

Timac
Copy link
Contributor

@Timac Timac commented Jan 30, 2024

  • Add Eve Energy Outlet fingerprint
  • Only create the polls (create_poll_schedule and create_poll_report_schedule) if the device supports capabilities.powerConsumptionReport
  • When the device is initialized, create child devices with the profile plug-binary for each additional outlet
  • Update component_to_endpoint, endpoint_to_component and find_child to support multiple children
  • Each time an oulet is turned on or off, store the value in a dictionary
  • If one of the outlet is on, we should create the poll to monitor the power consumption
  • If all the outlet are off, we should delete the poll

Timac added 3 commits January 30, 2024 09:33
- Add Eve Energy Outlet fingerprint
- Add Eve Energy Outlet fingerprint
- Only create the polls (create_poll_schedule and create_poll_report_schedule) if the device supports capabilities.powerConsumptionReport
- When the device is initialized, create child devices with the profile plug-binary for each additional outlet
- Update component_to_endpoint, endpoint_to_component and find_child to support multiple children
- Add a check in on_off_attr_handler to make sure the polling functions are only called for the parent device/endpoint 1, which supports powerConsumption
- Each time an oulet is turned on or off, store the value in a dictionary
- If one of the outlet is on, we should create the poll to monitor the power consumption
- If all the outlet are off, we should delete the poll
Copy link

github-actions bot commented Jan 30, 2024

Channel deleted.

Copy link

github-actions bot commented Jan 30, 2024

Test Results

   55 files  ±0    352 suites  ±0   0s ⏱️ ±0s
1 645 tests +2  1 645 ✅ +2  0 💤 ±0  0 ❌ ±0 
2 890 runs  +1  2 890 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit 321aa8b. ± Comparison against base commit d57f980.

This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
an attribute read should not be sent after 30s if there is a response
an attribute read should not be sent after 30s if there is a response another timing
Command success should result in opening/closing event
Initial level report
an attribute read should be sent after 30s if there is a non-matching response
an attribute read should not be sent after 30s if there is a matching response

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jan 30, 2024

File Coverage
All files 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/eve-energy/init.lua 91%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 321aa8b

Copy link
Contributor

@ctowns ctowns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small change, but this looks good! The device should arrive for testing shortly and we can confirm everything is working as expected.

Thank you for your help @Timac !

drivers/SmartThings/matter-switch/src/eve-energy/init.lua Outdated Show resolved Hide resolved
Only run the device_init function for the parent device.
@lelandblue lelandblue merged commit 3d29ba1 into SmartThingsCommunity:main Feb 22, 2024
19 checks passed
@Timac Timac deleted the feature/eve-energy-outlet branch February 26, 2024 09:02
ctowns pushed a commit that referenced this pull request Feb 26, 2024
* Eve Energy Outlet

- Add Eve Energy Outlet fingerprint

* Eve Energy Outlet

- Add Eve Energy Outlet fingerprint
- Only create the polls (create_poll_schedule and create_poll_report_schedule) if the device supports capabilities.powerConsumptionReport
- When the device is initialized, create child devices with the profile plug-binary for each additional outlet
- Update component_to_endpoint, endpoint_to_component and find_child to support multiple children
- Add a check in on_off_attr_handler to make sure the polling functions are only called for the parent device/endpoint 1, which supports powerConsumption

* Eve Energy Outlet

- Each time an oulet is turned on or off, store the value in a dictionary
- If one of the outlet is on, we should create the poll to monitor the power consumption
- If all the outlet are off, we should delete the poll

* Remove unused log to fix luacheck

* Don't change the profile, this breaks the unit tests

* Eve Energy Outlet

Only run the device_init function for the parent device.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants