jockesyk / homeassistant-yale-doorman-via-smarthub

A Home Assistant integration to control a Yale Doorman lock via the Yale Smart Hub.
GNU General Public License v3.0
14 stars 5 forks source link

Errors in HA log + lock entities not working with HomeKit integration #18

Closed ihelland closed 12 months ago

ihelland commented 3 years ago

Hi,

I have two Yale Doorman V2N connected and get the errors below in HA Log with this integration. The only issue I experience is that the lock entities will not work with HomeKit; lock entities can be seen in the HomeKit configuration (GUI) in HA, but does not appear as accessories in Home app on iOS devices. D6BF2DD5-1F70-4A05-A689-711FB0FA5F74

2021-04-30 20:13:46 ERROR (MainThread) [homeassistant.components.lock] Error adding entities for domain lock with platform yale_doorman_via_smarthub Traceback (most recent call last): File "/config/custom_components/yale_doorman_via_smarthub/lock.py", line 97, in icon door_status = int(self.coordinator.data["data"]["device_status"][self.idx]["minigw_lock_status"],16) ValueError: invalid literal for int() with base 16: '' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 434, in _async_add_entity original_icon=entity.icon, File "/config/custom_components/yale_doorman_via_smarthub/lock.py", line 100, in icon door_status = self.old_door_status AttributeError: 'YaleDoormanViaSmarthubLock' object has no attribute 'old_door_status'

2021-04-30 20:13:46 ERROR (MainThread) [homeassistant.components.lock] Error while setting up yale_doorman_via_smarthub platform for lock Traceback (most recent call last): File "/config/custom_components/yale_doorman_via_smarthub/lock.py", line 97, in icon door_status = int(self.coordinator.data["data"]["device_status"][self.idx]["minigw_lock_status"],16) ValueError: invalid literal for int() with base 16: '' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 213, in _async_setup_platform await asyncio.gather(pending) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 322, in async_add_entities await asyncio.gather(tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 434, in _async_add_entity original_icon=entity.icon, File "/config/custom_components/yale_doorman_via_smarthub/lock.py", line 100, in icon door_status = self.old_door_status AttributeError: 'YaleDoormanViaSmarthubLock' object has no attribute 'old_door_status'

jockesyk commented 12 months ago

This issue should be fixed in version 0.0.8 #30