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

visibility unit shows nmi? #235

Open
hmjgriffon1 opened this issue Aug 29, 2023 · 6 comments
Open

visibility unit shows nmi? #235

hmjgriffon1 opened this issue Aug 29, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@hmjgriffon1
Copy link

Home Assistant Version?

2023.8.4

Add-On or Self Hosted?

HA Supervised (Add-On)

Weatherflow2MQTT version?

3.2.0

What happened?

I am getting an error in my log that I don't think I saw before the update to 3.2.0 of the addon. I cannot find a way to change the unit of measurement for visibility myself or if I should even need to.

Relevant log output

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:659
Integration: Sensor (documentation, issues)
First occurred: 5:35:42 PM (1 occurrences)
Last logged: 5:35:42 PM

Entity sensor.tempest_st_00113901_visibility (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'nmi' which is not a valid unit for the device class ('distance') it is using; expected one of ['mi', 'in', 'mm', 'ft', 'yd', 'km', 'cm', 'm']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
@hmjgriffon1 hmjgriffon1 added the bug Something isn't working label Aug 29, 2023
@GlennGoddard
Copy link
Contributor

That probably was a home assistant change. When I get a chance, I will change the units km and mi from nautical mile. It may actually be in miles but did not get the units updated. I know I based the calculation off a NOAA survey of visibility compared to humidity and air pressure (I did not utilize the air pressure portion); then later I took into account station elevation for visibility.

@hmjgriffon1
Copy link
Author

That probably was a home assistant change. When I get a chance, I will change the units km and mi from nautical mile. It may actually be in miles but did not get the units updated. I know I based the calculation off a NOAA survey of visibility compared to humidity and air pressure (I did not utilize the air pressure portion); then later I took into account station elevation for visibility.

Awesome, thanks man, I don't see a problem with nautical miles myself and yeah it might actually be in miles but I guess HA doesn't like it haha.

@hmjgriffon1
Copy link
Author

How's it going Glenn? Just wondering if there is anything else I can do to help. :)

@GlennGoddard
Copy link
Contributor

It is returning the value at km or mi; I missed updating the imperial unit from nautical mile to mile. The value is miles thou. I should have a PR to fix it soon.

@hmjgriffon1
Copy link
Author

hmjgriffon1 commented Sep 9, 2023 via email

@GlennGoddard
Copy link
Contributor

PR is in
@briis I updated the imperial unit of measurement for visibility. It is in miles, but the unit of measure never got updated before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants