mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Make ring sync again (#16866)
This commit is contained in:
parent
e2a56721d3
commit
ba2b8512c5
@ -39,9 +39,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
def async_setup_platform(hass, config, async_add_entities,
|
|
||||||
discovery_info=None):
|
|
||||||
"""Set up a Ring Door Bell and StickUp Camera."""
|
"""Set up a Ring Door Bell and StickUp Camera."""
|
||||||
ring = hass.data[DATA_RING]
|
ring = hass.data[DATA_RING]
|
||||||
|
|
||||||
@ -67,14 +65,14 @@ def async_setup_platform(hass, config, async_add_entities,
|
|||||||
''' following cameras: {}.'''.format(cameras)
|
''' following cameras: {}.'''.format(cameras)
|
||||||
|
|
||||||
_LOGGER.error(err_msg)
|
_LOGGER.error(err_msg)
|
||||||
hass.components.persistent_notification.async_create(
|
hass.components.persistent_notification.create(
|
||||||
'Error: {}<br />'
|
'Error: {}<br />'
|
||||||
'You will need to restart hass after fixing.'
|
'You will need to restart hass after fixing.'
|
||||||
''.format(err_msg),
|
''.format(err_msg),
|
||||||
title=NOTIFICATION_TITLE,
|
title=NOTIFICATION_TITLE,
|
||||||
notification_id=NOTIFICATION_ID)
|
notification_id=NOTIFICATION_ID)
|
||||||
|
|
||||||
async_add_entities(cams, True)
|
add_entities(cams, True)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user