diff --git a/cbpi/__init__.py b/cbpi/__init__.py index 8a5d341..490799a 100644 --- a/cbpi/__init__.py +++ b/cbpi/__init__.py @@ -1,3 +1,3 @@ -__version__ = "4.0.7.a5" +__version__ = "4.0.7.a6" __codename__ = "Spring Break" diff --git a/cbpi/controller/sensor_controller.py b/cbpi/controller/sensor_controller.py index 6c70c87..ae8278f 100644 --- a/cbpi/controller/sensor_controller.py +++ b/cbpi/controller/sensor_controller.py @@ -19,6 +19,8 @@ class SensorController(BasicController): return dict(name=data.get("name"), id=data.get("id"), type=data.get("type"), state=state,props=data.get("props", [])) def get_sensor_value(self, id): + if id is None: + return None try: return self.find_by_id(id).instance.get_state() except Exception as e: