mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 10:59:40 +00:00
Nest config flow (#14921)
* Move nest to dir based component * Add config flow for Nest * Load Nest platforms via config entry * Add tests for Nest config flow * Import existing access tokens as config entries * Lint * Update coverage * Update translation * Fix tests * Address strings * Use python-nest token resolution * Lint * Do not do I/O inside constructor * Lint * Update test requirements
This commit is contained in:
@@ -23,14 +23,19 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({})
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
"""Set up a Nest Cam."""
|
||||
if discovery_info is None:
|
||||
return
|
||||
"""Set up a Nest Cam.
|
||||
|
||||
camera_devices = hass.data[nest.DATA_NEST].cameras()
|
||||
No longer in use.
|
||||
"""
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_devices):
|
||||
"""Set up a Nest sensor based on a config entry."""
|
||||
camera_devices = \
|
||||
await hass.async_add_job(hass.data[nest.DATA_NEST].cameras)
|
||||
cameras = [NestCamera(structure, device)
|
||||
for structure, device in camera_devices]
|
||||
add_devices(cameras, True)
|
||||
async_add_devices(cameras, True)
|
||||
|
||||
|
||||
class NestCamera(Camera):
|
||||
|
||||
Reference in New Issue
Block a user