a529987659852 / openwb2mqtt

Home Assistant Integration for openWB (Version 2)
13 stars 4 forks source link

Exception in message_received when handling msg on 'openWB/chargepoint/4/get/connected_vehicle/soc': argument 1 must be str, not float #21

Open Bascht74 opened 3 months ago

Bascht74 commented 3 months ago

Exception in message_received when handling msg on 'openWB/chargepoint/4/get/connected_vehicle/soc': '{"fault_str": "Kein Fehler.", "fault_state": 0, "range_charged": 17.236894736842153, "range_unit": "km", "range": null, "soc": 95, "timestamp": 1723997909.62533}' Traceback (most recent call last): File "/config/custom_components/openwb2mqtt/sensor.py", line 156, in message_received self._attr_native_value = self.entity_description.value_fn( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openwb2mqtt/const.py", line 472, in value_fn=lambda x: _convertDateTime(x), ^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openwb2mqtt/const.py", line 105, in _convertDateTime dateTimeObject = datetime.datetime.strptime(a, "%m/%d/%Y, %H:%M:%S") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: strptime() argument 1 must be str, not float

Exception in message_received when handling msg on 'openWB/chargepoint/5/get/connected_vehicle/soc': '{"fault_str": "Kein Fehler.", "fault_state": 0, "range_charged": 0, "range_unit": "km", "range": null, "soc": 95, "timestamp": 1723997909.62533}' Traceback (most recent call last): File "/config/custom_components/openwb2mqtt/sensor.py", line 156, in message_received self._attr_native_value = self.entity_description.value_fn( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openwb2mqtt/const.py", line 472, in value_fn=lambda x: _convertDateTime(x), ^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openwb2mqtt/const.py", line 105, in _convertDateTime dateTimeObject = datetime.datetime.strptime(a, "%m/%d/%Y, %H:%M:%S") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: strptime() argument 1 must be str, not float

Exception in message_received when handling msg on 'openWB/chargepoint/4/get/connected_vehicle/soc': '{"fault_str": "Kein Fehler.", "fault_state": 0, "range_charged": 17.236894736842153, "range_unit": "km", "range": null, "soc": 95, "timestamp": 1723998210.879654}' Traceback (most recent call last): File "/config/custom_components/openwb2mqtt/sensor.py", line 156, in message_received self._attr_native_value = self.entity_description.value_fn( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openwb2mqtt/const.py", line 472, in value_fn=lambda x: _convertDateTime(x), ^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openwb2mqtt/const.py", line 105, in _convertDateTime dateTimeObject = datetime.datetime.strptime(a, "%m/%d/%Y, %H:%M:%S") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: strptime() argument 1 must be str, not float

Exception in message_received when handling msg on 'openWB/chargepoint/5/get/connected_vehicle/soc': '{"fault_str": "Kein Fehler.", "fault_state": 0, "range_charged": 0, "range_unit": "km", "range": null, "soc": 95, "timestamp": 1723998210.879654}' Traceback (most recent call last): File "/config/custom_components/openwb2mqtt/sensor.py", line 156, in message_received self._attr_native_value = self.entity_description.value_fn( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openwb2mqtt/const.py", line 472, in value_fn=lambda x: _convertDateTime(x), ^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/openwb2mqtt/const.py", line 105, in _convertDateTime dateTimeObject = datetime.datetime.strptime(a, "%m/%d/%Y, %H:%M:%S") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: strptime() argument 1 must be str, not float