home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.87k stars 28.96k forks source link

ebusd: key error sensor-type #111382

Open majestixx opened 4 months ago

majestixx commented 4 months ago

The problem

While starting homeassistant I have the following errors in my logs:

2024-02-25 13:57:12.562 ERROR (MainThread) [homeassistant.setup] Error during setup of component ebusd
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 333, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/ebusd/__init__.py", line 75, in setup
    "sensor_types": SENSOR_TYPES[circuit],
                    ~~~~~~~~~~~~^^^^^^^^^
KeyError: 'ctl'

My setup: I have an ebus controller connected by wifi. A docker-container is running ebusd.

The output of "ebusctl i" lists:

root@ef6d749474ea:/# ebusctl i
version: ebusd 23.3.23.3
update check: OK
device: 192.168.178.56:9999, TCP, enhanced, firmware 1.1[4106].1[4106]
signal: acquired
symbol rate: 22
max symbol rate: 174
scan: finished
reconnects: 1
masters: 5
messages: 600
conditional: 0
poll: 0
update: 10
address 00: master #1
address 03: master #11
address 08: slave #11, scanned "MF=Vaillant;ID=HMU00;SW=0607;HW=5103", loaded "vaillant/08.hmu.csv"
address 10: master #2
address 15: slave #2, scanned "MF=Vaillant;ID=CTLV2;SW=0514;HW=1104", loaded "vaillant/15.ctlv2.csv"
address 31: master #8, ebusd
address 36: slave #8, ebusd
address 71: master #9
address 76: slave #9, scanned "MF=Vaillant;ID=VWZIO;SW=0607;HW=5103"

I have a Vaillant sensoCOMFORT VRC 720, a Vaillant aroTherm and the hydraulic station. So three devices seems to be right. I think the last one is the hydraulic station which seems to have no config.

In my configuration.yaml I have added:

ebusd:
  host: 192.168.178.38
  circuit: "ctl"

For the curcuit name I am unsure. According to https://github.com/bumaas/ebusdMQTT/blob/master/docs/de/InstallEbusdREADME.md#3-berprfung-der-konfiguration the first three letters of the ID are relevant. I have tried both CTL and ctl.

The same error with:

ebusd:
  host: 192.168.178.38
  circuit: "hmu"

Is there an error or did I make a mistake?

What version of Home Assistant Core has the issue?

core-2024.2.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

ebusd

Link to integration documentation on our website

https://www.home-assistant.io/integrations/ebusd

Diagnostics information

No response

Example YAML snippet

ebusd:
  host: 192.168.178.38
  circuit: "ctl"

Anything in the logs that might be useful for us?

2024-02-25 13:57:12.562 ERROR (MainThread) [homeassistant.setup] Error during setup of component ebusd
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 333, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/ebusd/__init__.py", line 75, in setup
    "sensor_types": SENSOR_TYPES[circuit],
                    ~~~~~~~~~~~~^^^^^^^^^
KeyError: 'ctl'

Additional information

No response

home-assistant[bot] commented 4 months ago

ebusd documentation ebusd source

Pantastisch commented 1 month ago

The circuit types are currently hardcoded, thus "ctl" and "hmu" are no valid types.

Docs: https://www.home-assistant.io/integrations/ebusd#circuit Source: https://github.com/home-assistant/core/blob/af0dd189d9f1fcafbe12311006c1cbf640e46442/homeassistant/components/ebusd/const.py#L17C1-L284C2