Skip to content

Failure setting up a new account / AC #150042

@nirizr

Description

@nirizr

The problem

After adding my newly created account with the Electra Smart android app to HA, the integration "Failed to set up: Check the logs"

When looking at the logs, this is the error shown:

Error setting up entry XXXREDACTED USER IDXXX for electrasmart
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 749, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/electrasmart/__init__.py", line 28, in async_setup_entry
    await api.fetch_devices()
  File "/usr/local/lib/python3.13/site-packages/electrasmart/api/__init__.py", line 162, in fetch_devices
    await task
  File "/usr/local/lib/python3.13/site-packages/electrasmart/api/__init__.py", line 189, in get_last_telemtry
    ac.update_operation_states(resp[Attributes.DATA])
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/electrasmart/device/__init__.py", line 123, in update_operation_states
    self._oper_data = json.loads(data["commandJson"]["OPER"])["OPER"]
                      ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
                    f'not {s.__class__.__name__}')
TypeError: the JSON object must be str, bytes or bytearray, not NoneType

What version of Home Assistant Core has the issue?

2025.7.3

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

Electra Smart

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions