-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Add Zimi Cloud Connect Integration #129876
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
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.
some first feedback
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Hi @zweckj |
I've marked this PR a draft, as changes are requested that need to be processed. Thanks! 👍 ../Frenck |
…ed for runtime_data)
…ation, simpler defaults, better description data
Fixed a couple of ruff and mypi errors in latest commit |
@zweckj Hi Josef, lots of cleanup since you last reviewed, can you review again please? |
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!
Are we ready to merge? If so, please press the Ready for review button. |
devices: done | ||
entity-category: todo | ||
entity-disabled-by-default: todo | ||
discovery: |
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 can’t automatically connect it, but can we not at least discover it to show it’s supported? (Might be that we already discussed this, it’s been a while 😅)
Thanks - test failures were unrelated 👍 Please share your Discord users (or message me on Discord), so we can add you to the relevant channels. |
I am markhannon on Discord |
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.
Please address the issues in a separate PR
config_entry_id=entry.entry_id, | ||
identifiers={(DOMAIN, api.mac)}, | ||
manufacturer=api.brand, | ||
name=f"{api.network_name}", |
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.
Why is this in an f string? if its typed str | None
rather use assert, if its something else use str()
] | ||
|
||
lights.extend( | ||
[ZimiDimmer(device, api) for device in api.lights if device.type == "dimmer"] |
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.
[ZimiDimmer(device, api) for device in api.lights if device.type == "dimmer"] | |
ZimiDimmer(device, api) for device in api.lights if device.type == "dimmer" |
if self._device.type != "dimmer": | ||
raise ValueError("ZimiDimmer needs a dimmable light") |
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 should not raise exceptions in a constructor
dependency-transparency: | ||
status: done | ||
comment: | | ||
https://mark_hannon@bitbucket.org/mark_hannon/zcc.git |
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 don't see an automated action to build and publish the dependency
assert result["type"] is FlowResultType.CREATE_ENTRY | ||
assert result["data"] == { | ||
"host": INPUT_HOST, | ||
"port": INPUT_PORT, | ||
"mac": format_mac(INPUT_MAC), | ||
} | ||
|
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 should also assert the unique id
Thanks - I will gather cleanup feedback and action in #144293 |
Proposed change
Add support for the Zimi Cloud Connect and Zimi lights in Home Assistant. This is a follow up on an old pull request here: #106449. This pull request answers a list of feedback from @emontnemery and requested changes based from that pull request, in summary those changes are:
Note: This is the first of hopefully a few sequential pull requests. Further pull requests will deliver support for other Zimi devices.
Dependencies:
Type 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: