Skip to content

Add rainbird rain delay number entity, deprecating the sensor and service#86208

Merged
frenck merged 5 commits into
home-assistant:devfrom
allenporter:rainbird-number
Jan 24, 2023
Merged

Add rainbird rain delay number entity, deprecating the sensor and service#86208
frenck merged 5 commits into
home-assistant:devfrom
allenporter:rainbird-number

Conversation

@allenporter
Copy link
Copy Markdown
Contributor

@allenporter allenporter commented Jan 19, 2023

Breaking change

The Rain Bird integration has changed the way the "Rain Delay" is managed. The Rain Delay, which pauses irrigation for a specified number of days, is now manage with a Number entity which can be controlled directly from the UI. The existing service call is rainbird.set_rain_delay and the Raindelay sensor have been deprecated. Any existing automations or scripts that make service calls to rainbird.set_rain_delay will need to be replaced with a call to number.set_value. Additionally, the existing service call was updated to require a config entry parameter since it previously had undefined behavior, so it is recommend to move directly to the new number service call.

Proposed change

Add the rain delay number entity, deprecating the sensor and service, as discussed in #85271

This adds the Number entity, and creates an issue in the issue registry to remind users to switch services. The tests were borrowed from existing functionality of the sensor and service.

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

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.

To help with the load of incoming pull requests:

@home-assistant
Copy link
Copy Markdown
Contributor

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

Code owner commands

Code owners of rainbird can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign rainbird Removes the current integration label and assignees on the issue, add the integration domain after the command.

Comment thread homeassistant/components/rainbird/__init__.py Outdated
@MartinHjelmare MartinHjelmare changed the title Add the rain delay number entity, deprecating the sensor and service Add rainbird rain delay number entity, deprecating the sensor and service Jan 19, 2023
Comment thread homeassistant/components/rainbird/__init__.py Outdated
Comment thread homeassistant/components/rainbird/__init__.py Outdated
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
@frenck frenck merged commit 09891ea into home-assistant:dev Jan 24, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 25, 2023
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.

3 participants