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

[Bug]: The unit of this entity changed #1391

Open
Draghmar opened this issue Oct 4, 2024 · 3 comments
Open

[Bug]: The unit of this entity changed #1391

Draghmar opened this issue Oct 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Draghmar
Copy link

Draghmar commented Oct 4, 2024

What happened?

After upadting HA to 2024.10 there are messages about few ATC (Atc1441) devices having:

The unit of 'ble voltage Lazienka' (sensor.ble_voltage_lazienka) changed to '' which can't be converted to the previously stored unit, 'V'.
If the historic statistic values have a wrong unit, you can update the units of the old values. The values will not be updated.
Otherwise you can choose to delete all historic statistic values, and start over.

HA suggests either deleting offending entries or update the unit. Tried both of them but I don't think anything happened.
Is this something related to the BLE Monitor?

Sensor type

ATC (Atc1441) [custom firmware]

Relevant log output

Logger: homeassistant.components.sensor
Source: components/sensor/__init__.py:731
integration: Sensor (documentation, issues)
First occurred: 3 October 2024 at 14:14:29 (10 occurrences)
Last logged: 3 October 2024 at 14:14:29

Entity sensor.ble_voltage_salon (<class 'custom_components.ble_monitor.sensor.MeasuringSensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
Entity sensor.ble_humidity_serwerownia (<class 'custom_components.ble_monitor.sensor.HumiditySensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('humidity') it is using; expected one of ['%']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
Entity sensor.ble_battery_serwerownia (<class 'custom_components.ble_monitor.sensor.BatterySensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('battery') it is using; expected one of ['%']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
Entity sensor.ble_humidity_sypialnia (<class 'custom_components.ble_monitor.sensor.HumiditySensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('humidity') it is using; expected one of ['%']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
Entity sensor.ble_voltage_sypialnia (<class 'custom_components.ble_monitor.sensor.MeasuringSensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
@Draghmar Draghmar added the bug Something isn't working label Oct 4, 2024
@etakpte
Copy link

etakpte commented Oct 4, 2024

Hi,

I have similar issue with Xiaomi Mi Scale V2 after 2024.10 update:

`The unit of 'ble stabilized weight' (sensor.ble_stabilized_weight) changed to '' which can't be converted to the previously stored unit, 'kg'.

The unit of 'ble non-stabilized weight' (sensor.ble_non_stabilized_weight) changed to '' which can't be converted to the previously stored unit, 'kg'.
`

BR,
P.

@Draghmar
Copy link
Author

Draghmar commented Oct 5, 2024

Hm...Weird thing. I had reboot Pi for other reason and after that those messages are gone. So maybe the fix did something but it needed reboot to show it up?
But I still got something in the log:

Source: components/sensor/__init__.py:731
integration: Sensor (documentation, issues)
First occurred: 10:20:50 (10 occurrences)
Last logged: 10:20:50

Entity sensor.ble_voltage_salon (<class 'custom_components.ble_monitor.sensor.MeasuringSensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
Entity sensor.ble_humidity_serwerownia (<class 'custom_components.ble_monitor.sensor.HumiditySensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('humidity') it is using; expected one of ['%']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
Entity sensor.ble_battery_serwerownia (<class 'custom_components.ble_monitor.sensor.BatterySensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('battery') it is using; expected one of ['%']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
Entity sensor.ble_humidity_sypialnia (<class 'custom_components.ble_monitor.sensor.HumiditySensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('humidity') it is using; expected one of ['%']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues
Entity sensor.ble_voltage_sypialnia (<class 'custom_components.ble_monitor.sensor.MeasuringSensor'>) is using native unit of measurement 'None' which is not a valid unit for the device class ('voltage') it is using; expected one of ['V', 'mV']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/custom-components/ble_monitor/issues

Could that mean that those logs are related to something else?

@Ernst79
Copy link
Collaborator

Ernst79 commented Oct 5, 2024

I thought I have seen the first error in the opening post somewhere, in some other issue. The solution, if I remember correct, was to to clear the cache and reboot, which is most likely the reason the error is gone now. But I can’t find back the issue where I have seen the solution.

The other issue can be ignored, you just received a BLE message without data, or the restore of the sensor data after a restart did not work. If it only happens after a reboot, try to change the setting to restore the sensor data after a reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants