Skip to content

Conversation

@karlowiczpl
Copy link

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

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • [x ] New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

I have done only tests for config flow

Checklist

  • [ x] The code change is tested and works locally.
  • [ x] Local tests pass. Your PR cannot be merged unless tests pass
  • [ x] There is no commented out code in this PR.
  • [ x] I have followed the development checklist
  • [ x] I have followed the perfect PR recommendations
  • [ x] The code has been formatted using Ruff (ruff format homeassistant tests)
  • [ x] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • [ x] The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • [ x] New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • [ x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link

@home-assistant home-assistant bot left a 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!

@home-assistant
Copy link

home-assistant bot commented Feb 7, 2025

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Copy link

@home-assistant home-assistant bot left a 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!

Copy link
Member

@balloob balloob left a 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.

@abmantis abmantis changed the title Gryfsmart Add Gryfsmart integration Feb 17, 2025
@karlowiczpl
Copy link
Author

Hey @balloob , do you have an estimate of when you might be able to review this PR?

@abmantis
Copy link
Member

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 precommit, since it can help a ensuring that everything is OK before pushing.

Thanks!

@abmantis abmantis marked this pull request as draft March 19, 2025 11:44
Copy link
Member

@abmantis abmantis left a 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?

@karlowiczpl
Copy link
Author

Hi, I accidentally pushed the wrong commit, but everything should be fixed now

@karlowiczpl karlowiczpl marked this pull request as ready for review March 19, 2025 12:01
@karlowiczpl
Copy link
Author

Hi @abmantis , why doesn't my PR get a review, thanks on advance

@abmantis
Copy link
Member

abmantis commented Apr 6, 2025

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:

Don't contact contributors, code owners, core team members, or other reviewers directly about a PR, or ping/mention them in a PR to ask for a review. While you probably mean this in a friendly way, it can be perceived as annoying or demanding. Instead, our bots will handle the pinging of the right people, and: have a bit of patience :)

Just try to keep your PR updated with dev from time to time, and someone will pick it up eventually. As you can see, we have a looot of PRs to review. If you can help and review some, it would also be great!

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,
Copy link
Member

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

Comment on lines +34 to +41
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",
}
Copy link
Member

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):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_PUSH

Comment on lines +94 to +95
vol.Required(CONF_PORT, default=DEFAULT_PORT): str,
vol.Required(CONF_MODULE_COUNT, default=1): int,
Copy link
Member

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?

Comment on lines +101 to +109
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,
)
Copy link
Member

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?

Comment on lines +15 to +27
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
Copy link
Member

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

Comment on lines +35 to +46
_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__()
Copy link
Member

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

@home-assistant home-assistant bot marked this pull request as draft May 9, 2025 14:35
@github-actions
Copy link

github-actions bot commented Jul 8, 2025

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.
If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes.
Thank you for your contribution!

@github-actions github-actions bot added the stale label Jul 8, 2025
@github-actions github-actions bot closed this Jul 15, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants