home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.82k stars 30.08k forks source link

Outdated documentation for Sensor integration's device_class #71906

Closed GSzabados closed 2 years ago

GSzabados commented 2 years ago

The problem

So the integration provides pressure value on the weather card as Pa, but actually HA's pressure unit for metric is hPa.

https://www.home-assistant.io/integrations/sensor/#device-class

What version of Home Assistant Core has the issue?

core-2022.4.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Tomorrow.io tomorrowio

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

The issue has been highlighted before, but ignored as the value is correct in Pa. But HA's unit of measurement is not matching with the unit provided (Pa vs hPa). https://github.com/home-assistant/core/pull/70107#issuecomment-1100857722

probot-home-assistant[bot] commented 2 years ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (sensor) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


sensor documentation sensor source (message by IssueLinks)

GSzabados commented 2 years ago

The issue is related to tomorrowio integration.

GSzabados commented 2 years ago

Oddly enough, the sensor integration documentation is incorrect as it mentions hPa and mbar only.

https://www.home-assistant.io/integrations/sensor/#device-class

https://github.com/home-assistant/core/blob/dev/homeassistant/const.py#L541

GSzabados commented 2 years ago

This PR should fix the documentation: https://github.com/home-assistant/home-assistant.io/pull/22762