Don't call async from sync (#13057)

This commit is contained in:
Paulus Schoutsen 2018-03-10 10:02:16 -08:00
parent 5281892e69
commit b98d2e2485

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))