mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-25 00:18:17 +01:00
avoid error logging / notification for Notification step w/o Sensor definittion
This commit is contained in:
parent
17a2d403bf
commit
8b2e0fb1d8
2 changed files with 3 additions and 1 deletions
|
@ -1,3 +1,3 @@
|
|||
__version__ = "4.0.7.a5"
|
||||
__version__ = "4.0.7.a6"
|
||||
__codename__ = "Spring Break"
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue