Skip to content

Sensors unavailable after update and back #343

@marcbaul

Description

@marcbaul

After an update to 0.8.3 and reverse to 0.8.2 the sensors in Zaptec are unavailable. In the log the following error appear:

`Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:451
integration: Sensor (documentation, issues)
First occurred: 8:03:09 AM (1 occurrence)
Last logged: 8:03:09 AM

Error while setting up zaptec platform for sensor: 'str' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 451, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/zaptec/sensor.py", line 354, in async_setup_entry
entities = entry.runtime_data.create_entities_from_zaptec(
INSTALLATION_ENTITIES,
CHARGER_ENTITIES,
)
File "/config/custom_components/zaptec/init.py", line 478, in create_entities_from_zaptec
self.create_entities_from_descriptions(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
charger_descriptions,
^^^^^^^^^^^^^^^^^^^^^
obj,
^^^^
info,
^^^^^
)
^
File "/config/custom_components/zaptec/init.py", line 422, in create_entities_from_descriptions
updater()
~~~~~~~^^
File "/config/custom_components/zaptec/sensor.py", line 121, in _update_from_zaptec
session_reading = get_ocmf_max_reader_value(session.get("SignedSession", {}))
^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'`

and after

`This error originated from a custom integration.

Logger: custom_components.zaptec.api
Source: custom_components/zaptec/api.py:168
integration: Zaptec EV charger (documentation, issues)
First occurred: 8:03:09 AM (2 occurrences)
Last logged: 8:03:10 AM

Failed to convert attribute CompletedSession (completed_session) value '{"SessionId":"6fa67dab-f2d4-41bd-87ca-454697412c11","Energy":0.0,"StartDateTime":"2025-10-10T11:36:24.835091Z","EndDateTime":"2025-10-10T11:40:24.399049Z","ReliableClock":true,"StoppedByRFID":false,"AuthenticationCode":"nfc-xxxxxxxx","SignedSession":null}': 'NoneType' object has no attribute 'split'`

What can I do to get the Zaptec sensors working again?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions