Mqtt sensor not getting added to device registry through mqtt discovery

Hi all,

I am using mqtt discovery, sending config data from ESP12e to hassio.
Home Assistant OS 5.9 running on Raspi 4 model B.
config_topic: homeassistant/sensor/wts_dist/config
state_topic: homeassistant/sensor/wts_dist/state

When subscribed with # topic in Configuration>>Integration>>Mqtt_broker>>Configure>>Subscribe, I am getting json data on config_topic as follows:

“name”: “Water_Tank_Sensor_D”,
“dev_cla”: “None”,
“stat_t”: “homeassistant/sensor/wts_dist/state”,
“avty_t”: “homeassistant/sensor/wts_dist/available”,
“pl_avail”: “online”,
“pl_not_avail”: “offline”,
“unit_of_meas”: “%”,
“val_tpl”: “{{ value_json.filledcap}}”,
“ic”: “mdi:water-pump”,
“uniq_id”: “Water_Tank_Sensor_D-2C_3A_11_11_11_11”,
“dev”: {“ids”: [“Water_Tank_Sensor_D-2C_3A_11_11_11_11”],“name”: “Water_Tank_Sensor_D”,“mdl”: “NodeMCU 1.0 (ESP12E module)”,“mf”: “Amica”,“sw”: “v0.1”}

But, the device is not getting added to core.device_registry & core.entity_registry.
mqtt_discovery is set to true, confirmed in core.config_entries. Earlier it was working perfectly, has anything changed with new hass os version 5.9?

Can any one help me on this?

Thanks in advance

I am getting this error in hassio logs. Can anyone help me to decode this?

Ok I solved it myself, I used to send “device_class: distance/None” data in the config topic. But I guess distance is not defined as a valid class in hassio device class, it was giving me that error. Now I am not sending “device_class” data in config topic, so it takes default value as None. So now I am able to see the sensor on hassio.