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

Add additional entities for Shelly BLU TRV #135244

Merged
merged 12 commits into from
Jan 20, 2025

Conversation

bieniu
Copy link
Member

@bieniu bieniu commented Jan 9, 2025

Breaking change

Proposed change

This PR introduces new entities for Shelly BLU TRV:

  • battery sensor
  • signal strength sensor
  • valve position sensor (only if automatic temperature control is disabled for the device)
  • calibration binary sensor
  • external temperature number entity
  • valve position number entity (only if automatic temperature control is enabled for the device)

PR introduces the ability to select an entity class via entity description. I added a helper get_entity_class to easily select the appropriate class for the entity. In future changes we may migrate more entity descriptions to pass information about the appropriate entity class.

obraz

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
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format 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.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Jan 9, 2025

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

Code owner commands

Code owners of shelly can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign shelly Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@bieniu bieniu force-pushed the shelly-blu-trv-valve-pos branch from 4981b50 to 7327ced Compare January 10, 2025 16:32
@valerix85
Copy link

Sorry for the stupid question, but it will be available on next release?

@bieniu
Copy link
Member Author

bieniu commented Jan 11, 2025

it will be available on next release?

Do you mean BLU TRV support or additional entities for it?

@valerix85
Copy link

it will be available on next release?

Do you mean BLU TRV support or additional entities for it?

The TRV support, because I updated to latest version of HA expecting to be available but they are still available only via MQTT integration

@bieniu
Copy link
Member Author

bieniu commented Jan 11, 2025

The TRV support

HA 2025.2.0. But you can configure the device via ZHA integration in earlier versions of HA.

@valerix85
Copy link

The TRV support

HA 2025.2.0. But you can configure the device via ZHA integration in earlier versions of HA.

Many thanks for the clarification! I will wait it because I’m ok with MQTT, but the valve control and other amenities it’s good to have it as a official release

@bieniu
Copy link
Member Author

bieniu commented Jan 11, 2025

but the valve control and other amenities it’s good to have

You can use Shellies Discovery and you will get all entities (valve position, external temperature, calibration, etc.) via MQTT.

@bieniu bieniu marked this pull request as ready for review January 11, 2025 14:38
@bieniu bieniu force-pushed the shelly-blu-trv-valve-pos branch from aed07a4 to 5b36e7f Compare January 19, 2025 13:16
@thecode thecode merged commit 11d44e6 into home-assistant:dev Jan 20, 2025
32 checks passed
@bieniu
Copy link
Member Author

bieniu commented Jan 20, 2025

Thanks guys

@bieniu bieniu deleted the shelly-blu-trv-valve-pos branch January 20, 2025 22:46
huyuwei1996 pushed a commit to huyuwei1996/home-assistant that referenced this pull request Jan 21, 2025
* Add valve position sensor

* Add valve position and external sensor temperature numbers

* Fix method name

* Better name

* Add remove condition

* Add calibration binary sensor

* Add battery and signal strength sensors

* Remove condition from ShellyRpcEntity

* Typo

* Add get_entity_class helper

* Add tests

* Use snapshots in tests
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 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.

6 participants