-
-
Notifications
You must be signed in to change notification settings - Fork 36.3k
Add Gryfsmart integration #137753
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 Gryfsmart integration #137753
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.
Hi @karlowiczpl
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
|
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.
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.
Hi @karlowiczpl
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
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.
Integration needs to be updated to use the modern approach to integration building. Also, it seems like you want to base it on YAML configuration which we no longer support.
5ca0e08 to
01920cc
Compare
|
Hey @balloob , do you have an estimate of when you might be able to review this PR? |
|
Hey @karlowiczpl ! Marking this as draft since there are CI checks that are failing. Please take a look at them. By the way, I recommend that you setup 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.
There were a lot of previous review comments that were marked as resolved, but the code was not updated. I marked them as unresolved again.
Maybe forgot to push some commits?
|
Hi, I accidentally pushed the wrong commit, but everything should be fixed now |
|
Hi @abmantis , why doesn't my PR get a review, thanks on advance |
Hey. I understand your frustration and interest in getting this moving faster. I have been there too :) I know it can be annoying to see weeks pass and no reviews... But, as our docs mention:
Just try to keep your PR updated with I would also recommend avoiding force-pushing, since it makes it harder to review the diff of new commits on Github. By the way, this page has a lot of great info about the process we all use here. |
|
|
||
| async def async_setup_entry( | ||
| hass: HomeAssistant, | ||
| entry: ConfigEntry, |
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.
extend the config entry type and add the data you put in entry.runtime_data there
| entry.runtime_data[CONF_DEVICE_DATA] = { | ||
| "identifiers": {(DOMAIN, "Gryf Smart", entry.unique_id)}, | ||
| "name": f"Gryf Smart {entry.unique_id}", | ||
| "manufacturer": "Gryf Smart", | ||
| "model": "serial", | ||
| "sw_version": "1.0.0", | ||
| "hw_version": "1.0.0", | ||
| } |
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 don't need to store this one in here
| return True | ||
|
|
||
|
|
||
| class GryfSmartConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): |
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.
| class GryfSmartConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): | |
| class GryfSmartConfigFlow(ConfigFlow, domain=DOMAIN): |
| """Gryf Smart ConfigFlow.""" | ||
|
|
||
| VERSION = 1 | ||
| CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH |
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.
| CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH |
| vol.Required(CONF_PORT, default=DEFAULT_PORT): str, | ||
| vol.Required(CONF_MODULE_COUNT, default=1): int, |
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.
what's a port and a module?
| async def async_step_device_menu( | ||
| self, user_input: dict[str, Any] | None = None | ||
| ) -> config_entries.ConfigFlowResult: | ||
| """Show menu step.""" | ||
|
|
||
| return self.async_show_menu( | ||
| step_id="device_menu", | ||
| menu_options=CONFIG_FLOW_MENU_OPTIONS, | ||
| ) |
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.
How does one add devices without the use of Home Assistant?
| class _EntityBase(Entity): | ||
| """Base Entity for Gryf Smart.""" | ||
|
|
||
| _attr_should_poll = False | ||
| _attr_entity_registry_enabled_default = True | ||
|
|
||
| _api: GryfApi | ||
| _device: _GryfDevice | ||
| _attr_unique_id: str | None | ||
|
|
||
| @property | ||
| def name(self) -> str: | ||
| return self._device.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.
not sure why we have this
| _config_entry: ConfigEntry | ||
|
|
||
| def __init__( | ||
| self, | ||
| config_entry: ConfigEntry, | ||
| device: _GryfDevice, | ||
| ) -> None: | ||
| """Init Gryf config flow entity.""" | ||
|
|
||
| self._device = device | ||
| self._config_entry = config_entry | ||
| super().__init__() |
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.
let's not keep a reference to the config entry in there
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Breaking change
The Gryf Smart integration is truly an impressive solution. It is based on a distributed RS232 communication system with a local push architecture, ensuring the highest level of security. This setup provides an enormous gateway to the world for the Gryf Smart system, offering both reliability and scalability. It's an innovative approach that opens up a wealth of possibilities for seamless automation and control.
Proposed change
This pull request introduces a new integration called GryfSmart.
Type of change
Additional information
I have done only tests for config flow
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: