-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Add eheimdigital integration #126757
base: dev
Are you sure you want to change the base?
Add eheimdigital integration #126757
Conversation
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.
See comments.
Feel free to reach out to me on Discord if you have any questions.
"""Handle zeroconf discovery.""" | ||
self.data[CONF_HOST] = host = discovery_info.host | ||
|
||
self._async_abort_entries_match(self.data) |
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.
I think the unique_id check is good enough
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.
It has the advantage of early return without needing to connect, especially in this case where only one device is advertising via zeroconf and so when it found one it only changes when the IP address changes or the user resets the devices and connect the devices to the network from scratch.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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.
Almost there, 2 comments and I left another comment on a question you asked
Since this now should be a bronze integration, can you add the quality_scale.yaml with the bronze stuff? |
@@ -0,0 +1,70 @@ | |||
rules: |
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're still new to this. But I would suggest for the initial PR we should just only add the bronze rules. Even though its the same code, I notice that the way I review code is different when I am checking for a new integration or when I am checking if the scale is applied. At this moment I feel like that there is a large overhead in checking for both the integration being good and checking if it satisfies the tiers above bronze.
Maybe in the future when a lot of the checks are automated, this could be better.
Also feel free to let me know what you think about this by the way.
Can you also add the base checklist to the PR description and add the quality_scale field to the manifest.json?
assert not await async_remove_config_entry_device( | ||
hass, mock_config_entry, device_entry | ||
) | ||
|
||
eheimdigital_hub_mock.return_value.devices = {} | ||
|
||
assert await async_remove_config_entry_device(hass, mock_config_entry, device_entry) |
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.
I think we should test this via the websocket like the frontend does. I think enphase_envoy
has tests for this
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.
Thanks, I tried to find something and failed
Proposed change
This adds the EHEIM Digital integration. EHEIM Digital is a line of smart aquarium products, such as lighting, filters, heaters, feeders etc. https://eheim.com/en_GB/aquatics/eheim-digital/
The connection works via a central local Websocket API, where one of the devices acts as a master/hub and the devices create some kind of WiFi mesh to communicate with each other.
This PR implements the light platform of the classicLEDcontrol devices.
Link to library: https://github.com/autinerd/eheimdigital
Bronze
config-flow
- Integration needs to be able to be set up via the UIdata-description
to give context to fieldsConfigEntry.data
andConfigEntry.options
correctlytest-before-configure
- Test a connection in the config flowunique-config-entry
- Don't allow the same device or service to be able to be set up twiceconfig-flow-test-coverage
- Full test coverage for the config flowruntime-data
- Use ConfigEntry.runtime_data to store runtime datatest-before-setup
- Check during integration initialization if we are able to set it up correctlyappropriate-polling
- If it's a polling integration, set an appropriate polling intervalentity-unique-id
- Entities have a unique IDhas-entity-name
- Entities use has_entity_name = Trueentity-event-setup
- Entities event setupdependency-transparency
- Dependency transparencyaction-setup
- Service actions are registered in async_setupcommon-modules
- Place common patterns in common modulesdocs-high-level-description
- The documentation includes a high-level description of the integration brand, product, or servicedocs-installation-instructions
- The documentation provides step-by-step installation instructions for the integration, including, if needed, prerequisitesdocs-removal-instructions
- The documentation provides removal instructionsdocs-actions
- The documentation describes the provided service actions that can be usedbrands
- Has branding assets available for the integrationType of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: