avoid error logging / notification for Notification step w/o Sensor definittion

This commit is contained in:
avollkopf 2022-10-22 14:08:59 +02:00
parent 17a2d403bf
commit 8b2e0fb1d8
2 changed files with 3 additions and 1 deletions

View file

@ -1,3 +1,3 @@
__version__ = "4.0.7.a5"
__version__ = "4.0.7.a6"
__codename__ = "Spring Break"

View file

@ -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: