1 """The Sky Remote Control integration."""
5 from skyboxremote
import RemoteControl, SkyBoxConnectionError
12 PLATFORMS = [Platform.REMOTE]
14 _LOGGER = logging.getLogger(__name__)
17 type SkyRemoteConfigEntry = ConfigEntry[RemoteControl]
21 """Set up Sky remote."""
22 host = entry.data[CONF_HOST]
23 port = entry.data[CONF_PORT]
25 _LOGGER.debug(
"Setting up Host: %s, Port: %s", host, port)
26 remote = RemoteControl(host, port)
28 await remote.check_connectable()
29 except SkyBoxConnectionError
as e:
30 raise ConfigEntryNotReady
from e
32 entry.runtime_data = remote
33 await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
38 """Unload a config entry."""
39 return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
bool async_unload_entry(HomeAssistant hass, ConfigEntry entry)
bool async_setup_entry(HomeAssistant hass, SkyRemoteConfigEntry entry)