Allow reloading automation without restarting HA (#3002)

This commit is contained in:
Paulus Schoutsen authored and Johann Kellerman committed 2016-09-04 17:15:52 +02:00
1 parent 641d531be3
commit e9813b219e
7 files changed
+365 -107

No files matched your search

+4
View File
@@ -195,6 +195,10 @@ class Entity(object):
return self.hass.states.set(
self.entity_id, state, attr, self.force_update)
def remove(self) -> None:
"""Remove entitiy from HASS."""
self.hass.states.remove(self.entity_id)
def _attr_setter(self, name, typ, attr, attrs):
"""Helper method to populate attributes based on properties."""
if attr in attrs: