示例#1
0
 def get(self, request):
     """Return all data needed to bootstrap Home Assistant."""
     return self.json({
         'config': self.hass.config.as_dict(),
         'states': self.hass.states.all(),
         'events': api.events_json(self.hass),
         'services': api.services_json(self.hass),
     })
示例#2
0
 def get(self, request):
     """Return all data needed to bootstrap Home Assistant."""
     return self.json({
         'config': self.hass.config.as_dict(),
         'states': self.hass.states.all(),
         'events': api.events_json(self.hass),
         'services': api.services_json(self.hass),
     })
示例#3
0
def _handle_get_api_bootstrap(handler, path_match, data):
    """Return all data needed to bootstrap Home Assistant."""
    hass = handler.server.hass

    handler.write_json({
        'config': hass.config.as_dict(),
        'states': hass.states.all(),
        'events': api.events_json(hass),
        'services': api.services_json(hass),
    })
示例#4
0
def _handle_get_api_bootstrap(handler, path_match, data):
    """ Returns all data needed to bootstrap Home Assistant. """
    hass = handler.server.hass

    handler.write_json({
        'config': hass.config.as_dict(),
        'states': hass.states.all(),
        'events': api.events_json(hass),
        'services': api.services_json(hass),
    })