mirror of
https://github.com/home-assistant/core.git
synced 2025-10-14 22:29:36 +00:00
Raise ConditionError for state errors (#46244)
This commit is contained in:

committed by
GitHub

parent
6a62ebb6a4
commit
f27066e773
@@ -356,7 +356,12 @@ class BayesianBinarySensor(BinarySensorEntity):
|
||||
"""Return True if state conditions are met."""
|
||||
entity = entity_observation["entity_id"]
|
||||
|
||||
return condition.state(self.hass, entity, entity_observation.get("to_state"))
|
||||
try:
|
||||
return condition.state(
|
||||
self.hass, entity, entity_observation.get("to_state")
|
||||
)
|
||||
except ConditionError:
|
||||
return False
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
Reference in New Issue
Block a user