Remove homeassistant.remote (#16099)
* Remove homeassistant.remote * Use direct import for API * Fix docstring
This commit is contained in:
parent
ae5c4c7e13
commit
7bb5344942
18 changed files with 62 additions and 555 deletions
|
@ -24,7 +24,7 @@ from homeassistant.exceptions import TemplateError
|
|||
from homeassistant.helpers import template
|
||||
from homeassistant.helpers.service import async_get_all_descriptions
|
||||
from homeassistant.helpers.state import AsyncTrackStates
|
||||
import homeassistant.remote as rem
|
||||
from homeassistant.helpers.json import JSONEncoder
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -102,7 +102,7 @@ class APIEventStream(HomeAssistantView):
|
|||
if event.event_type == EVENT_HOMEASSISTANT_STOP:
|
||||
data = stop_obj
|
||||
else:
|
||||
data = json.dumps(event, cls=rem.JSONEncoder)
|
||||
data = json.dumps(event, cls=JSONEncoder)
|
||||
|
||||
await to_write.put(data)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue