mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Dont load notify.ios if no devices exist. Thanks @arsaboo for catching this.
This commit is contained in:
parent
f25ddef4d7
commit
23f54b07c7
@ -45,6 +45,13 @@ def get_service(hass, config):
|
|||||||
# Need this to enable requirements checking in the app.
|
# Need this to enable requirements checking in the app.
|
||||||
hass.config.components.append("notify.ios")
|
hass.config.components.append("notify.ios")
|
||||||
|
|
||||||
|
if not ios.devices_with_push():
|
||||||
|
_LOGGER.error(("The notify.ios platform was loaded but no "
|
||||||
|
"devices exist! Please check the documentation at "
|
||||||
|
"https://home-assistant.io/components/notify.ios/ "
|
||||||
|
"for more information"))
|
||||||
|
return None
|
||||||
|
|
||||||
return iOSNotificationService()
|
return iOSNotificationService()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user