Fix Harmony entity service schema (#50025)

This commit is contained in:
Franck Nijhof
2021-05-03 18:41:16 +02:00
committed by Paulus Schoutsen
parent 5f0281f0ba
commit c3f757c1ae

View File

@@ -15,7 +15,6 @@ from homeassistant.components.remote import (
SUPPORT_ACTIVITY,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_ENTITY_ID
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers import entity_platform
import homeassistant.helpers.config_validation as cv
@@ -44,14 +43,9 @@ PARALLEL_UPDATES = 0
ATTR_CHANNEL = "channel"
HARMONY_SYNC_SCHEMA = vol.Schema({vol.Optional(ATTR_ENTITY_ID): cv.entity_ids})
HARMONY_CHANGE_CHANNEL_SCHEMA = vol.Schema(
{
vol.Required(ATTR_ENTITY_ID): cv.entity_ids,
vol.Required(ATTR_CHANNEL): cv.positive_int,
}
)
HARMONY_CHANGE_CHANNEL_SCHEMA = {
vol.Required(ATTR_CHANNEL): cv.positive_int,
}
async def async_setup_entry(
@@ -74,7 +68,7 @@ async def async_setup_entry(
platform.async_register_entity_service(
SERVICE_SYNC,
HARMONY_SYNC_SCHEMA,
{},
"sync",
)
platform.async_register_entity_service(