def setup_platform(hass, config, add_entities, discover_info=None):
    """Set up the AVR platform."""
    name = config[CONF_NAME]
    host = config[CONF_HOST]
    port = config[CONF_PORT]

    avr = hkavr.HkAVR(host, port, name)
    avr_device = HkAvrDevice(avr)

    add_entities([avr_device], True)
Пример #2
0
def setup_platform(
    hass: HomeAssistant,
    config: ConfigType,
    add_entities: AddEntitiesCallback,
    discover_info: DiscoveryInfoType | None = None,
) -> None:
    """Set up the AVR platform."""
    name = config[CONF_NAME]
    host = config[CONF_HOST]
    port = config[CONF_PORT]

    avr = hkavr.HkAVR(host, port, name)
    avr_device = HkAvrDevice(avr)

    add_entities([avr_device], True)