Skip to content

Move onewire raw_value attribute to separate sensor#61093

Closed
epenet wants to merge 14 commits intohome-assistant:devfrom
epenet:onewire-state-attributes
Closed

Move onewire raw_value attribute to separate sensor#61093
epenet wants to merge 14 commits intohome-assistant:devfrom
epenet:onewire-state-attributes

Conversation

@epenet
Copy link
Copy Markdown
Contributor

@epenet epenet commented Dec 6, 2021

Breaking change

The raw_value state attribute has been removed from all onewire entities.
Please use the corresponding sensor instead.

Proposed change

The raw_value state attribute has been removed from all onewire entities.
In the case of temperature, pressure, illuminance and humidity sensors, this has been moved to a separate sensor.
For the other sensors (voltage, count, moisture) the automatic rounding has been removed

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

  • 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
Copy link
Copy Markdown

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

@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Dec 6, 2021

Could this be included in 2021.12.0 ?

@epenet epenet marked this pull request as draft December 6, 2021 10:53
@epenet epenet marked this pull request as ready for review December 6, 2021 10:59
@garbled1
Copy link
Copy Markdown
Contributor

garbled1 commented Dec 6, 2021

I worry that this will break a certain class of automation. We don't know if users are using this in automations anywhere. While the temperature of my back yard is not useful at 3 decimal places, the temperature of my aquarium, or anything I'm attempting to temperature control, absolutely is. Or if I'm using a pair of sensors to measure a minor difference between two things, such as pressure sensors on either side of an AC filter to measure the filter dirt.

I fully get that alot of people probably use these to just measure a few room temperatures here and there, and that is the sort of default case, but I'd hate to break anyone doing anything more advanced.

@epenet epenet marked this pull request as draft December 6, 2021 11:16
@epenet epenet changed the title Drop raw_value state attribute in Onewire Prevent database flooding in Onewire Dec 7, 2021
@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Dec 7, 2021

I worry that this will break a certain class of automation.

As discussed on Discord, I will use an option flow instead to deactivate the state attribute.

@bdraco
Copy link
Copy Markdown
Member

bdraco commented Dec 7, 2021

Another option would to be to make the raw value its own sensor and disable it by default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't clone the raw value of a moisture device, they are identical.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same with 0-3, and the leaf wetness too.

@epenet epenet force-pushed the onewire-state-attributes branch from b20985f to cf4b935 Compare December 7, 2021 15:21
@epenet epenet changed the title Prevent database flooding in Onewire Move raw_value attribute to separate sensor Dec 7, 2021
@epenet epenet marked this pull request as ready for review December 7, 2021 15:39
@MartinHjelmare MartinHjelmare changed the title Move raw_value attribute to separate sensor Move onewire raw_value attribute to separate sensor Dec 7, 2021
@epenet epenet marked this pull request as draft December 8, 2021 06:58
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 7, 2022

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 Jan 7, 2022
@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Jan 7, 2022

Keeping as draft until #63222 is resolved

@bdraco bdraco removed the stale label Jan 7, 2022
@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Jan 18, 2022

Note: I have opened an arch discussion to see if there are other ways to solve this: home-assistant/architecture#713

@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Jan 26, 2022

#63222 is now merged - but I think #64315 is still needed

@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 26, 2022
@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Apr 26, 2022

Not stale

@github-actions github-actions bot removed the stale label Apr 26, 2022
@epenet epenet closed this Jun 29, 2022
@epenet
Copy link
Copy Markdown
Contributor Author

epenet commented Jun 29, 2022

Giving up on this - probably not really needed.

@epenet epenet deleted the onewire-state-attributes branch June 29, 2022 10:31
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2022
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