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

Allow kV (Kilo Volt) for device class: voltage #134997

Closed
lschloetterer opened this issue Jan 7, 2025 · 1 comment
Closed

Allow kV (Kilo Volt) for device class: voltage #134997

lschloetterer opened this issue Jan 7, 2025 · 1 comment

Comments

@lschloetterer
Copy link

lschloetterer commented Jan 7, 2025

The problem

I'm seeing this error in the logs

Logger: homeassistant.components.sensor
Quelle: components/sensor/__init__.py:709
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 14:49:24 (1 Vorkommnisse)
Zuletzt protokolliert: 14:49:24

Entity sensor.heizung_partikelabscheider_spannung (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'kV' which is not a valid unit for the device class ('voltage') it is using; expected one of ['mV', 'µV', 'V']; 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

The custom mqtt sensor is set up with these values:

unit_of_measurement: "kV"
state_class: "measurement"
device_class: "voltage"

Everything works fine, but I think all metric prefixes should be allowed without warnings in the log.

What version of Home Assistant Core has the issue?

core-2025.1.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

mqtt

Link to integration documentation on our website

https://www.home-assistant.io/integrations/sensor/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@mib1185
Copy link
Contributor

mib1185 commented Jan 7, 2025

Hi @lschloetterer

This sounds more like an feature request?
Please use the feature request section of our forum to contribute on existing or create new feature requests.
For sure, contributions are always welcome, so please feel free to create a PR on your own.

Thanks! 👍

@mib1185 mib1185 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants