a529987659852 / openwb2mqtt

Home Assistant Integration for openWB (Version 2)
9 stars 3 forks source link

Exception in message_received when handling msg on 'openWB/chargepoint/1/get/connected_vehicle/config' - Cannot assign to field payload #16

Closed DrHauss closed 4 months ago

DrHauss commented 4 months ago

Hi guys,

I did some debugging on another module I used and while doing that I recognized that my log got flooded with following messages on :

2024-05-14 16:51:31.624 ERROR (MainThread) [homeassistant.util.logging] Exception in message_received when handling msg on 'openWB/chargepoint/1/get/connected_vehicle/config': '{"average_consumption": 20000, "charge_template": 2, "chargemode": "pv_charging", "current_plan": null, "ev_template": 1, "priority": false, "time_charging_in_use": false}'
Traceback (most recent call last):
  File "/config/custom_components/openwb2mqtt/select.py", line 102, in message_received
    message.payload = self.entity_description.value_fn(message.payload)
    ^^^^^^^^^^^^^^^
  File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'payload'

2024-05-14 16:51:31.687 ERROR (MainThread) [homeassistant.util.logging] Exception in message_received when handling msg on 'openWB/chargepoint/1/get/connected_vehicle/config': '{"average_consumption": 20000, "charge_template": 2, "chargemode": "pv_charging", "current_plan": null, "ev_template": 1, "priority": false, "time_charging_in_use": false}'
Traceback (most recent call last):
  File "/config/custom_components/openwb2mqtt/select.py", line 102, in message_received
    message.payload = self.entity_description.value_fn(message.payload)
    ^^^^^^^^^^^^^^^
  File "<string>", line 4, in __setattr__
dataclasses.FrozenInstanceError: cannot assign to field 'payload'

I already removed the integration and removed it from HASS, restarted HASS and install and configure it again but issue persist.

Versions:

DrHauss commented 4 months ago

Seems to occur because of another custom component. After updating this component the error here disappears.