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

MiliPascal unit (mPa) not supported on an MQTT Sensor with device class pressure #133595

Open
Domochip opened this issue Dec 19, 2024 · 1 comment

Comments

@Domochip
Copy link

The problem

I have an auto-discovered MQTT sensor which is of device_class "pressure" and its unit_of_measurement is "mPa" (miliPascal)

Home Assistant reports me this error:

Logger: homeassistant.components.sensor
Source: components/sensor/init.py:746
integration: Sensor (documentation, issues)
First occurred: December 18, 2024 at 4:01:35 AM (2 occurrences)
Last logged: December 18, 2024 at 4:01:35 AM

  • Entity sensor.stove_targetdifferentialpressure (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'mPa' which is not a valid unit for the device class ('pressure') it is using; expected one of ['bar', 'inHg', 'cbar', 'Pa', 'kPa', 'psi', 'hPa', 'mmHg', 'mbar']; 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
  • Entity sensor.stove_differentialpressure (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'mPa' which is not a valid unit for the device class ('pressure') it is using; expected one of ['bar', 'inHg', 'cbar', 'Pa', 'kPa', 'psi', 'hPa', 'mmHg', 'mbar']; 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

What version of Home Assistant Core has the issue?

core-2024.12.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Sensor

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

It is a JSON sent via MQTT on topic (I cleaned it up): homeassistant/sensor/WPalaControl_LT201XXX_DifferentialPressure/config

{
  "~": "WPalaControl"
  "device_class": "pressure",
  "enabled_by_default": false,
  "entity_category": "diagnostic",
  "name": "Differential Pressure",
  "object_id": "stove_differentialpressure",
  "unique_id": "WPalaControl_LT201XXX_DifferentialPressure",
  "state_class": "measurement",
  "state_topic": "~/DPRS",
  "unit_of_measurement": "mPa"
}

Anything in the logs that might be useful for us?

Entity sensor.stove_targetdifferentialpressure (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'mPa' which is not a valid unit for the device class ('pressure') it is using; expected one of ['bar', 'inHg', 'cbar', 'Pa', 'kPa', 'psi', 'hPa', 'mmHg', 'mbar']; 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

Additional information

No response

@home-assistant
Copy link

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!

Code owner commands

Code owners of sensor can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign sensor Removes the current integration label and assignees on the issue, 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 issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


sensor documentation
sensor source
(message by IssueLinks)

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

1 participant