Skip to content

Add services to SmartTub for changing filtration settings#46980

Merged
bdraco merged 30 commits intohome-assistant:devfrom
mdz:smarttub-filtration-services
May 23, 2021
Merged

Add services to SmartTub for changing filtration settings#46980
bdraco merged 30 commits intohome-assistant:devfrom
mdz:smarttub-filtration-services

Conversation

@mdz
Copy link
Copy Markdown
Contributor

@mdz mdz commented Feb 24, 2021

Proposed change

Adds smarttub.set_primary_filtration and smarttub.set_secondary_filtration services.

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

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.
  • 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:

Comment thread homeassistant/components/smarttub/sensor.py Outdated
Comment thread homeassistant/components/smarttub/sensor.py Outdated
Comment thread homeassistant/components/smarttub/sensor.py Outdated
Comment thread homeassistant/components/smarttub/sensor.py Outdated
Comment thread homeassistant/components/smarttub/sensor.py Outdated
Comment thread homeassistant/components/smarttub/services.yaml
Comment thread homeassistant/components/smarttub/sensor.py Outdated
Comment thread homeassistant/components/smarttub/sensor.py Outdated
Comment thread homeassistant/components/smarttub/sensor.py Outdated
@bdraco
Copy link
Copy Markdown
Member

bdraco commented Feb 24, 2021

@mdz. Were you able to retest?

@mdz
Copy link
Copy Markdown
Contributor Author

mdz commented Feb 24, 2021

@bdraco yes, the service calls work fine, but I haven't been able to get the services.yaml changes working properly. Even if I just put an empty target: stanza in there, I don't get an entity selection drop-down in the front end

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Feb 24, 2021

Try rebasing to the latest dev, there is a new frontend package.

@mdz
Copy link
Copy Markdown
Contributor Author

mdz commented Feb 28, 2021

I'm not sure what was wrong, but with 2021.3.0b3 + this branch as a custom integration it seems to be working now.

I'm able to filter the target entities by platform and domain, which is better than nothing, but it would be best to have the service only target the relevant entity (SmartTubPrimaryFiltrationCycle for set_primary_filtration and SmartTubSecondaryFiltrationCycle for set_secondary_filtration). I tried to get that to work, but couldn't, so I rolled it back in 02cb31f

image

@mdz mdz marked this pull request as ready for review February 28, 2021 23:00
@bdraco
Copy link
Copy Markdown
Member

bdraco commented Feb 28, 2021

Looks like this has a conflict now.

@mdz
Copy link
Copy Markdown
Contributor Author

mdz commented Mar 1, 2021

Resolved

Comment thread homeassistant/components/smarttub/sensor.py
@mdz
Copy link
Copy Markdown
Contributor Author

mdz commented Mar 16, 2021 via email

@frenck
Copy link
Copy Markdown
Member

frenck commented Mar 16, 2021

That is correct, but maybe its better to not have them both required in that case? (at least for the services.yaml file, as the service schema still protects it from bad input).

@mdz
Copy link
Copy Markdown
Contributor Author

mdz commented Mar 17, 2021 via email

@github-actions
Copy link
Copy Markdown

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.
Thank you for your contributions.

@github-actions github-actions Bot added the stale label Apr 16, 2021
@mdz
Copy link
Copy Markdown
Contributor Author

mdz commented Apr 16, 2021

@frenck mind taking another look?

@github-actions github-actions Bot removed the stale label Apr 16, 2021
@mdz mdz requested a review from frenck April 16, 2021 03:33
@github-actions
Copy link
Copy Markdown

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.
Thank you for your contributions.

@github-actions github-actions Bot added the stale label May 23, 2021
@mdz
Copy link
Copy Markdown
Contributor Author

mdz commented May 23, 2021

Still relevant

@github-actions github-actions Bot removed the stale label May 23, 2021
Copy link
Copy Markdown
Member

@bdraco bdraco left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@bdraco bdraco merged commit 87438dd into home-assistant:dev May 23, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators May 24, 2021
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.

4 participants