Don't call async from sync ()

pull/13050/merge
Paulus Schoutsen 2018-03-10 10:02:16 -08:00 committed by GitHub
parent 40485a6e89
commit f01b5b0040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions
homeassistant/components

View File

@ -182,19 +182,19 @@ def setup(hass, config):
gateway_only_schema = _add_gateway_to_schema(xiaomi, vol.Schema({}))
hass.services.async_register(
hass.services.register(
DOMAIN, SERVICE_PLAY_RINGTONE, play_ringtone_service,
schema=_add_gateway_to_schema(xiaomi, SERVICE_SCHEMA_PLAY_RINGTONE))
hass.services.async_register(
hass.services.register(
DOMAIN, SERVICE_STOP_RINGTONE, stop_ringtone_service,
schema=gateway_only_schema)
hass.services.async_register(
hass.services.register(
DOMAIN, SERVICE_ADD_DEVICE, add_device_service,
schema=gateway_only_schema)
hass.services.async_register(
hass.services.register(
DOMAIN, SERVICE_REMOVE_DEVICE, remove_device_service,
schema=_add_gateway_to_schema(xiaomi, SERVICE_SCHEMA_REMOVE_DEVICE))