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

Correction to Homeassistant MQTT Discovery for Temp unit #841

Open
michaelsidenius opened this issue Sep 11, 2024 · 2 comments
Open

Correction to Homeassistant MQTT Discovery for Temp unit #841

michaelsidenius opened this issue Sep 11, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@michaelsidenius
Copy link

Describe the bug
Homeassistant is giving a warning:

WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.ams_d015_temp (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'C' which is not a valid unit for the device class ('temperature') it is using; expected one of ['°C', '°F', 'K']; 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

To Reproduce
Setup AMS reader to use a MQTT server with Homeassistant payload

Expected behavior
No Homeassistant warnings

Screenshots

Hardware information:

  • Denmark
  • Meter: Kampstrup
  • Encryption enabled: Yes
  • AMS reader: ESP8266
  • M-bus adapter (if applicable):

Relevant firmware information:

  • Version: v2.3.8
  • MQTT: yes
  • MQTT payload type: Homeassistant
  • HAN GPIO: UART2
  • HAN baud and parity: 2400 8N1
  • Temperature sensors: NONE
  • ENTSO-E API enabled: no

Additional context

@michaelsidenius michaelsidenius changed the title Correction to Homeassistant MQTT Discovery for Temo unit Correction to Homeassistant MQTT Discovery for Temp unit Sep 11, 2024
@ArnieO ArnieO added the enhancement New feature or request label Sep 11, 2024
@ArnieO
Copy link
Contributor

ArnieO commented Sep 11, 2024

Thank you for notifying us on that warning.
So HA wants the °-sign in addition to C.
OK - we'll put it on the list for a future update.

@ArnieO ArnieO closed this as completed Sep 11, 2024
@ArnieO ArnieO reopened this Sep 11, 2024
@gskjold gskjold added this to the v2.3.9 milestone Oct 27, 2024
@gskjold
Copy link
Member

gskjold commented Nov 3, 2024

Unable to reproduce, no warning here. Also, the sensor config sent to HA contains the degree symbol:

{"name":"Temperature sensor ","stat_t":"amstest/state","uniq_id":"SmartMeter_AMS_temp","obj_id":"SmartMeter_AMS_temp","unit_of_meas":"°C","val_tpl":"{{ value_json.temp | is_defined }}","expire_after":900,"dev":{"ids":["SmartMeter_AMS"],"name":"AMS reader","mdl":"S2 mini","sw":"af6ecc5","mf":"Wemos","cu":"http://SmartMeter_AMS.local/"},"dev_cla":"temperature","stat_cla":"measurement"}

It is a long time ago since we fixed this (https://github.com/UtilitechAS/amsreader-firmware/releases/tag/v2.2.11), could it be that you have been using amsreader since before this version?

@gskjold gskjold removed this from the v2.3.9 milestone Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants