Skip to content

Wrong type of device_type is send to Home Assistant #1587

@szczukot

Description

@szczukot

Description

I have HA with ebusd.
one of the sensors gets bad json in mqtt in discovery.

Why is it energy instead of time or duration

{
  "unique_id": "ebusd_f43_PumpEnergySaveCalculatedTimeMonitor_value",
  "name": "PumpEnergySaveCalculatedTimeMonitor ",
  "device": {
    "identifiers": "ebusd_f43",
    "manufacturer": "ebusd.eu",
    "name": "ebusd f43",
    "via_device": "ebusd",
    "sw_version": "25.1",
    "suggested_area": "Heating"
  },
  "value_template": "{{value_json[\"value\"].value}}",
  "state_topic": "ebusd/f43/PumpEnergySaveCalculatedTimeMonitor",
  "unit_of_measurement": "min",
  "state_class": "total_increasing",
  "device_class": "energy"
}

Actual behavior

2025-09-18 16:28:50.189 ERROR (MainThread) [homeassistant.components.mqtt.entity] Error 'The unit of measurement min is not valid together with device class energy' when processing MQTT discovery message topic: 'homeassistant/sensor/ebusd_f43_PumpEnergySaveCalculatedTimeMonitor_value/config', message: '{'unique_id': 'ebusd_f43_PumpEnergySaveCalculatedTimeMonitor_value', 'device': {'identifiers': 'ebusd_f43', 'manufacturer': 'ebusd.eu', 'via_device': 'ebusd', 'sw_version': '25.1', 'suggested_area': 'Heating', 'name': 'ebusd f43'}, 'value_template': '{{value_json["value"].value}}', 'state_topic': 'ebusd/f43/PumpEnergySaveCalculatedTimeMonitor', 'unit_of_measurement': 'min', 'state_class': 'total_increasing', 'device_class': 'energy', 'name': 'PumpEnergySaveCalculatedTimeMonitor '}'

Expected behavior

Correct device_class

ebusd version

25.1

ebusd arguments

ebusd --foreground --mqtthost=core-mosquitto --mqttport=1883 --mqttuser=addons --scanconfig --mqttjson --mqttint=/etc/ebusd/mqtt-hassio.cfg --mqttvar=filter-direction=r|u|^w --mqtttopic=ebusd --device=ens:/dev/ttyACM0 --log=all:notice --log=update:error

Operating system

other

CPU architecture

x64

Dockerized

other

Hardware interface

Adapter Shield v5 via USB

Related integration

MQTT Home Assistant via mqtt-hassio.cfg

Logs

2025-09-19 18:32:09.647 [device notice] transport opened
2025-09-19 18:32:09.658 [main notice] ebusd 25.1.p20250414 started with broadcast scan on device: /dev/ttyACM0, serial high speed, enhanced
2025-09-19 18:32:10.618 [bus notice] bus started with own address 31/36
2025-09-19 18:32:10.619 [device notice] reset, supports info
2025-09-19 18:32:10.619 [bus notice] signal acquired
2025-09-19 18:32:10.619 [bus notice] new master 10, master count 2
2025-09-19 18:32:10.619 [bus notice] new master 03, master count 3
2025-09-19 18:32:10.619 [device notice] extra info: firmware 1.1[560f].1[560f], jumpers 0x03
2025-09-19 18:32:11.255 [mqtt notice] connection established
2025-09-19 18:32:20.619 [main notice] starting initial broadcast scan
2025-09-19 18:32:20.755 [bus notice] new master 3f, master count 4
2025-09-19 18:32:20.969 [bus notice] new master 7f, master count 5
2025-09-19 18:32:30.898 [bus notice] scan 08: ;Vaillant;BAI00;0518;7401
2025-09-19 18:32:30.898 [bus notice] scan 08: ;Vaillant;BAI00;0518;7401
2025-09-19 18:32:32.016 [main notice] read common config file vaillant/broadcast.csv
2025-09-19 18:32:32.349 [main notice] read common config file vaillant/general.csv
2025-09-19 18:32:32.770 [main notice] read common config file vaillant/scan.csv
2025-09-19 18:32:33.103 [main notice] read scan config file vaillant/08.bai.csv for ID "bai00", SW0518, HW7401
2025-09-19 18:32:34.032 [bus notice] max. symbols per second: 137
2025-09-19 18:32:34.502 [main notice] found messages: 222 (0 conditional on 31 conditions, 0 poll, 16 update)
2025-09-19 18:32:35.114 [bus notice] scan 08: ;21;10;40;0010003869;3100;005327;N7
2025-09-19 18:32:37.356 [bus notice] scan 15: ;Vaillant;F4300;0120;2102
2025-09-19 18:32:37.357 [bus notice] scan 15: ;Vaillant;F4300;0120;2102
2025-09-19 18:32:38.001 [bus notice] max. symbols per second: 151
2025-09-19 18:32:38.039 [bus notice] scan 15: ;21;10;33;0020028524;0907;005556;N6
2025-09-19 18:32:38.850 [main notice] read scan config file vaillant/15.f43.csv for ID "f4300", SW0120, HW2102
2025-09-19 18:32:38.850 [main notice] found messages: 435 (7 conditional on 35 conditions, 0 poll, 16 update)
2025-09-19 18:32:40.994 [main error] scan config 44: ERR: read timeout
2025-09-19 18:32:43.132 [bus notice] scan 50: ;Vaillant;V6100;0119;1902
2025-09-19 18:32:43.132 [bus notice] scan 50: ;Vaillant;V6100;0119;1902
2025-09-19 18:32:43.856 [bus notice] scan 50: ;??;??;??;??????????;????;??????;??
2025-09-19 18:32:44.002 [bus notice] max. symbols per second: 156
2025-09-19 18:32:44.674 [main notice] read scan config file vaillant/50.v61.mc.csv for ID "v6100", SW0119, HW1902
2025-09-19 18:32:44.674 [main notice] found messages: 544 (11 conditional on 38 conditions, 130 poll, 16 update)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions