core icon indicating copy to clipboard operation
core copied to clipboard

Fix missing unit of measurement for blink wifi strength

Open magicalyak opened this issue 1 year ago • 1 comments

Proposed change

Type of change

  • [ ] Dependency upgrade
  • [X] 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 #109349
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • [x] The code change is tested and works locally.
  • [x] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the development checklist
  • [x] I have followed the perfect PR recommendations
  • [x] 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:

magicalyak avatar Oct 14 '24 22:10 magicalyak

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

Code owner commands

Code owners of blink 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 blink 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.

home-assistant[bot] avatar Oct 14 '24 22:10 home-assistant[bot]

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

home-assistant[bot] avatar Oct 16 '24 20:10 home-assistant[bot]

The thing is, the units provided from the API are "unit less". Maybe something has changed in the API, but when we added this enity the API provided some number between 1 and 5 (or something like that)

mkmer avatar Oct 16 '24 20:10 mkmer

I will update the pr and test that. Thanks. Sent from my iPhoneOn Oct 16, 2024, at 4:02 PM, Franck Nijhof @.***> wrote: @frenck requested changes on this pull request.

We have a constant for this unit, SIGNAL_STRENGTH_DECIBELS_MILLIWATT, please use that one instead. ../Frenck

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

magicalyak avatar Oct 16 '24 21:10 magicalyak

Thanks for handling the change @magicalyak 👍

Could you also respond to the question put out by @mkmer?

I've marked the PR as draft for now for that reason. Thanks 👍

../Frenck

frenck avatar Oct 18 '24 06:10 frenck

The thing is, the units provided from the API are "unit less". Maybe something has changed in the API, but when we added this enity the API provided some number between 1 and 5 (or something like that)

From my blink devices on the current code , I have the following values which all would be the dBm wifi strength if that helps. The API 100% changed. This was working fine until the API removed the units by default and now they come across as no unit of measurement. Previously they were reported as dBm without any configuration in YAML or otherwise. Older users will get warnings now that the units changed from dBM to "." without the modification at the moment.

Blink Wifi Readings (not the front door is a Blink doorbell and responds a little differently so the wifi strength is unknown) sensor.blink_ac_condenser_wi_fi_signal_strength: -47 sensor.blink_back_deck_wi_fi_signal_strength: -54 sensor.blink_back_yard_bedroom_wi_fi_signal_strength: -60 sensor.blink_basement_door_wi_fi_signal_strength: -71 sensor.blink_driveway_wi_fi_signal_strength: -69 sensor.blink_front_door_wi_fi_signal_strength: unknown sensor.blink_front_yard_wi_fi_signal_strength: -85 sensor.blink_garage_door_wi_fi_signal_strength: -82 sensor.blink_garage_wi_fi_signal_strength: -70 sensor.blink_pool_wi_fi_signal_strength: -40

magicalyak avatar Oct 18 '24 13:10 magicalyak

Sure looks like this has change (again) and appears to be dBM. Thanks for the update!

mkmer avatar Oct 18 '24 13:10 mkmer

Hi there @magicalyak 👋

This PR is currently still in draft + there is a merge conflict now. Could you take a look?

Thanks! 👍

Oh and @mkmer does your last comment mean you agree on this change?

../Frenck

frenck avatar Nov 08 '24 22:11 frenck

I agree it makes sense :)

mkmer avatar Nov 08 '24 22:11 mkmer

Hi there @magicalyak 👋

This PR is currently still in draft + there is a merge conflict now. Could you take a look?

Thanks! 👍

Oh and @mkmer does your last comment mean you agree on this change?

../Frenck

I've resolved the merge conflict

magicalyak avatar Nov 09 '24 03:11 magicalyak