Hey,
I am the developer of a custom component https://github.com/mk-maddin/wattpilot-HA.
I am creating an entity sensor.wattpilot_rssi - upon trying to 'async_add_entities' i get the following error:
Entity <class 'custom_components.wattpilot.sensor.ChargerSensor'> suggest an incorrect unit of measurement: dB. (builtins.ValueError)
The entity has attributes (not only ones but as I think the relevant ones) set as follows:
_attr_device_class = signal_strength
_attr_native_unit_of_measurement = dB
_attr_native_value = 0
_attr_state = None
_attr_suggested_unit_of_measurement = dB
_attr_unit_of_measurement = None
The interesting thing is, if I create & add the entity once without _attr_suggested_unit_of_measurement & _attr_native_unit_of_measurement and add these attributes on code side after next restart,
everything works as expected.
Any ideas what I am doing wrong here?