-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Adding this here for tracking and to help remind me to address it. Maybe an api change has occurred.
Error adding entity switch.home_charger_charge_now for domain switch with platform evnex
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 676, in _async_add_entities
await self._async_add_entity(
entity, False, entity_registry, config_subentry_id
)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1002, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1380, in add_to_platform_finish
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1024, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1149, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1086, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1030, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1659, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/evnex/switch.py", line 83, in is_on
return self.entity_description.is_on_func(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
self.coordinator.data, self.charger_id
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/config/custom_components/evnex/switch.py", line 42, in
.chargeNow,
^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'chargeNow'