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

Migrate attributes to sensors in Litter-Robot #78580

Merged
merged 10 commits into from
Sep 26, 2022

Conversation

tkdrob
Copy link
Contributor

@tkdrob tkdrob commented Sep 16, 2022

Breaking change

The vacuum entity attributes in the Litter-Robot integration are now available as diagnostic sensors.
Please adjust any automations or scripts you may have that use these attributes.

Proposed change

Migrate attributes to sensors in Litter-Robot

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • 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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • 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:

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

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant probot-home-assistant bot added deprecation Indicates a breaking change to happen in the future integration: litterrobot by-code-owner labels Sep 16, 2022
@probot-home-assistant
Copy link

Hey there @natekspencer, mind taking a look at this pull request as it has been labeled with an integration (litterrobot) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

Copy link
Contributor

@natekspencer natekspencer left a comment

Choose a reason for hiding this comment

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

LGTM and was one of the next items on the list to tackle! The documentation will need to be updated to reflect the changes. Also, the next release of pylitterbot will include power status for the feeder robot as well. We'll want to add that here when the dependency gets bumped.

Copy link
Contributor

@natekspencer natekspencer left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@natekspencer natekspencer left a comment

Choose a reason for hiding this comment

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

Thanks!

Robot: (
RobotBinarySensorEntityDescription[Robot](
key="power_status",
name="Power status",
Copy link
Member

Choose a reason for hiding this comment

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

Is this plugged in? Can we make this Charging?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure charging is the right concept for this. The unit is primarily mains powered and doesn't include a backup battery by default (except, I think, on the feeder robot). And nothing in the "API" indicates whether a battery is actually installed. So most of the time it's simply just "AC" in the data to indicate it's powered.

Copy link
Member

Choose a reason for hiding this comment

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

Why does it even exist if it has no battery 😬

Copy link
Member

Choose a reason for hiding this comment

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

It's powered on or it's unavailable ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Clarification, a battery isn't included by default, but you can buy one and install it so that it continues to function during power outages. I've installed one in all of my units. So then it comes back as "AC", "DC" or "NC" (not connected).

@balloob balloob merged commit bd01f90 into home-assistant:dev Sep 26, 2022
@tkdrob tkdrob deleted the litterrobot_attr branch September 26, 2022 02:42
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2022
@@ -33,6 +36,21 @@ def get_platforms_for_robots(robots: list[Robot]) -> set[Platform]:
}


async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Litter-Robot integration."""
async_create_issue(
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this repairs issue. We don't know that there's any issue as we don't know that the user is using the deprecated attributes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
by-code-owner cla-signed deprecation Indicates a breaking change to happen in the future integration: litterrobot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants