added schema validation for specific values

This commit is contained in:
iLLiCiTiT 2021-05-26 20:23:37 +02:00
parent bbb2e1562a
commit a18aa04bf6

View file

@ -266,6 +266,14 @@ class BaseItemEntity(BaseEntity):
self, "Dynamic entity has set `is_group` to true."
)
if (
self._require_restart
and (self.is_dynamic_item or self.is_in_dynamic_item)
):
raise EntitySchemaError(
self, "Dynamic entity can't require restart."
)
@abstractmethod
def set_override_state(self, state):
"""Set override state and trigger it on children.