diff --git a/changelog b/changelog index 3b88fe89..166f0158 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ aarlo/pyaarlo +0.7.4.2: + Support 'synced' state 0.7.4.1: Fix camera recording issue. 0.7.4: diff --git a/custom_components.json b/custom_components.json index 3f3ea8ba..f620671c 100644 --- a/custom_components.json +++ b/custom_components.json @@ -1,6 +1,6 @@ { "aarlo": { - "version": "0.7.4.1", + "version": "0.7.4.2", "local_location": "/custom_components/aarlo/__init__.py", "remote_location": "https://raw.githubusercontent.com/twrecked/hass-aarlo/master/custom_components/aarlo/__init__.py", "visit_repo": "https://github.com/twrecked/hass-aarlo", @@ -18,7 +18,7 @@ ] }, "pyaarlo": { - "version": "0.7.4.1", + "version": "0.7.4.2", "local_location": "/custom_components/aarlo/pyaarlo/__init__.py", "remote_location": "https://raw.githubusercontent.com/twrecked/hass-aarlo/master/custom_components/aarlo/pyaarlo/__init__.py", "visit_repo": "https://github.com/twrecked/hass-aarlo", diff --git a/custom_components/aarlo/__init__.py b/custom_components/aarlo/__init__.py index 905e7b54..231a2df8 100644 --- a/custom_components/aarlo/__init__.py +++ b/custom_components/aarlo/__init__.py @@ -33,7 +33,7 @@ SIREN_STATE_KEY ) -__version__ = "0.7.4.1" +__version__ = "0.7.4.2" _LOGGER = logging.getLogger(__name__) diff --git a/custom_components/aarlo/manifest.json b/custom_components/aarlo/manifest.json index 5530dc9d..fd465b05 100644 --- a/custom_components/aarlo/manifest.json +++ b/custom_components/aarlo/manifest.json @@ -7,5 +7,5 @@ "iot_class": "cloud_push", "issue_tracker": "https://github.com/twrecked/hass-aarlo/issues", "requirements": ["unidecode","cloudscraper>=1.2.71", "paho-mqtt"], - "version": "0.7.4.1" + "version": "0.7.4.2" } diff --git a/custom_components/aarlo/pyaarlo/__init__.py b/custom_components/aarlo/pyaarlo/__init__.py index 65a86ae6..6168b505 100644 --- a/custom_components/aarlo/pyaarlo/__init__.py +++ b/custom_components/aarlo/pyaarlo/__init__.py @@ -34,6 +34,7 @@ TOTAL_LIGHTS_KEY, LOCATIONS_PATH_FORMAT, LOCATIONS_EMERGENCY_PATH, + VALID_DEVICE_STATES, ) from .doorbell import ArloDoorBell from .light import ArloLight @@ -45,7 +46,7 @@ _LOGGER = logging.getLogger("pyaarlo") -__version__ = "0.7.4.1" +__version__ = "0.7.4.2" class PyArlo(object): @@ -202,8 +203,9 @@ def __init__(self, **kwargs): for device in self._devices: dname = device.get("deviceName") dtype = device.get("deviceType") - if device.get("state", "unknown") != "provisioned": - self.info("skipping " + dname + ": state unknown") + device_state = device.get("state", "unknown").lower() + if device_state not in VALID_DEVICE_STATES: + self.info(f"skipping {dname}: state is {device_state}") continue # This needs it's own code now... Does no parent indicate a base station??? diff --git a/custom_components/aarlo/pyaarlo/constant.py b/custom_components/aarlo/pyaarlo/constant.py index abbc825a..12f13e85 100644 --- a/custom_components/aarlo/pyaarlo/constant.py +++ b/custom_components/aarlo/pyaarlo/constant.py @@ -269,3 +269,5 @@ MODEL_GO = "VML4030" MODEL_ALL_IN_1_SENSOR = "MS1001" + +VALID_DEVICE_STATES = ["provisioned", "synced"]