RFC: Use bind_hass for helpers (#9745)

* Add Helpers bind_hass functionality

* Update other helpers
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2017-10-08 08:17:54 -07:00
1 parent e19e9a1f2b
commit ca54bbfcc9
16 files changed
+108 -25

No files matched your search

+3 -2
View File
@@ -30,7 +30,7 @@ from homeassistant.const import (
EVENT_SERVICE_EXECUTED, EVENT_SERVICE_REGISTERED, EVENT_STATE_CHANGED,
EVENT_TIME_CHANGED, MATCH_ALL, EVENT_HOMEASSISTANT_CLOSE,
EVENT_SERVICE_REMOVED, __version__)
from homeassistant.loader import Components
from homeassistant import loader
from homeassistant.exceptions import (
HomeAssistantError, InvalidEntityFormatError)
from homeassistant.util.async import (
@@ -129,7 +129,8 @@ class HomeAssistant(object):
self.services = ServiceRegistry(self)
self.states = StateMachine(self.bus, self.loop)
self.config = Config() # type: Config
self.components = Components(self)
self.components = loader.Components(self)
self.helpers = loader.Helpers(self)
# This is a dictionary that any component can store any data on.
self.data = {}
self.state = CoreState.not_running