hass-weatherflow2mqtt icon indicating copy to clipboard operation
hass-weatherflow2mqtt copied to clipboard

visibility unit shows nmi?

Open hmjgriffon1 opened this issue 1 year ago • 6 comments

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 avatar Aug 29 '23 22:08 hmjgriffon1

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.

GlennGoddard avatar Aug 30 '23 04:08 GlennGoddard

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 avatar Aug 30 '23 12:08 hmjgriffon1

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

hmjgriffon1 avatar Sep 08 '23 02:09 hmjgriffon1

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.

GlennGoddard avatar Sep 08 '23 19:09 GlennGoddard

Awesome.

On Fri, Sep 8, 2023 at 3:59 PM Glenn @.***> wrote:

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.

— Reply to this email directly, view it on GitHub https://github.com/briis/hass-weatherflow2mqtt/issues/235#issuecomment-1712160454, or unsubscribe https://github.com/notifications/unsubscribe-auth/A47NQ2BABEJ55PF3PV623B3XZN2JBANCNFSM6AAAAAA4DTTZVQ . You are receiving this because you authored the thread.Message ID: @.***>

hmjgriffon1 avatar Sep 09 '23 00:09 hmjgriffon1

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.

GlennGoddard avatar Sep 12 '23 21:09 GlennGoddard