diff --git a/PyMyGekko/resources/Cams.py b/PyMyGekko/resources/Cams.py index 5693eb2..f587f5e 100644 --- a/PyMyGekko/resources/Cams.py +++ b/PyMyGekko/resources/Cams.py @@ -82,8 +82,8 @@ def update_resources(self, resources): if key not in self._data: self._data[key] = {} self._data[key]["name"] = cams[key]["name"] - self._data[key]["imagepath"] = cams[key]["imagepath"] - self._data[key]["streampath"] = cams[key]["streampath"] + self._data[key]["imagepath"] = cams[key].get("imagepath", None) + self._data[key]["streampath"] = cams[key].get("streampath", None) @property def cams(self): diff --git a/PyMyGekko/resources/DoorInterComs.py b/PyMyGekko/resources/DoorInterComs.py index 61021fc..ac8e1e7 100644 --- a/PyMyGekko/resources/DoorInterComs.py +++ b/PyMyGekko/resources/DoorInterComs.py @@ -96,7 +96,7 @@ class DoorInterComConnectionState(IntEnum): ERROR_FAV_CHECK = -3 ERROR_PROVISIONING = -2 ERROR_CONNECTION = -1 - NOT_SET_UP = (0,) + NOT_SET_UP = 0 OK = 1 diff --git a/tests/door_inter_coms/test_pymygekko_door_inter_coms_879015.py b/tests/door_inter_coms/test_pymygekko_door_inter_coms_879015.py index de290e6..854130c 100644 --- a/tests/door_inter_coms/test_pymygekko_door_inter_coms_879015.py +++ b/tests/door_inter_coms/test_pymygekko_door_inter_coms_879015.py @@ -5,6 +5,7 @@ from aiohttp import web from PyMyGekko import MyGekkoApiClientBase from PyMyGekko.resources.DoorInterComs import DoorInterComConnectionState +from PyMyGekko.resources.DoorInterComs import DoorInterComSoundMode _LOGGER: logging.Logger = logging.getLogger(__name__) @@ -63,3 +64,4 @@ async def test_get_door_inter_coms(mock_server): assert door_inter_coms[0].connection_state == DoorInterComConnectionState.OK assert door_inter_coms[0].last_missed_call_date is None assert door_inter_coms[0].missed_calls == 0 + assert door_inter_coms[0].sound_mode == DoorInterComSoundMode.RINGING