mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Deprecate LIFX Legacy integration (#47235)
This commit is contained in:
parent
4f9f870e7d
commit
d1afef843b
@ -4,7 +4,6 @@ from datetime import timedelta
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
import logging
|
import logging
|
||||||
import math
|
import math
|
||||||
import sys
|
|
||||||
|
|
||||||
import aiolifx as aiolifx_module
|
import aiolifx as aiolifx_module
|
||||||
import aiolifx_effects as aiolifx_effects_module
|
import aiolifx_effects as aiolifx_effects_module
|
||||||
@ -166,12 +165,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||||||
|
|
||||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||||
"""Set up LIFX from a config entry."""
|
"""Set up LIFX from a config entry."""
|
||||||
if sys.platform == "win32":
|
|
||||||
_LOGGER.warning(
|
|
||||||
"The lifx platform is known to not work on Windows. "
|
|
||||||
"Consider using the lifx_legacy platform instead"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Priority 1: manual config
|
# Priority 1: manual config
|
||||||
interfaces = hass.data[LIFX_DOMAIN].get(DOMAIN)
|
interfaces = hass.data[LIFX_DOMAIN].get(DOMAIN)
|
||||||
if not interfaces:
|
if not interfaces:
|
||||||
|
@ -46,13 +46,22 @@ SUPPORT_LIFX = (
|
|||||||
SUPPORT_BRIGHTNESS | SUPPORT_COLOR_TEMP | SUPPORT_COLOR | SUPPORT_TRANSITION
|
SUPPORT_BRIGHTNESS | SUPPORT_COLOR_TEMP | SUPPORT_COLOR | SUPPORT_TRANSITION
|
||||||
)
|
)
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
PLATFORM_SCHEMA = vol.All(
|
||||||
|
cv.deprecated(CONF_SERVER),
|
||||||
|
cv.deprecated(CONF_BROADCAST),
|
||||||
|
PLATFORM_SCHEMA.extend(
|
||||||
{vol.Optional(CONF_SERVER): cv.string, vol.Optional(CONF_BROADCAST): cv.string}
|
{vol.Optional(CONF_SERVER): cv.string, vol.Optional(CONF_BROADCAST): cv.string}
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the LIFX platform."""
|
"""Set up the LIFX platform."""
|
||||||
|
_LOGGER.warning(
|
||||||
|
"The LIFX Legacy platform is deprecated and will be removed in "
|
||||||
|
"Home Assistant Core 2021.6.0. Use the LIFX integration instead."
|
||||||
|
)
|
||||||
|
|
||||||
server_addr = config.get(CONF_SERVER)
|
server_addr = config.get(CONF_SERVER)
|
||||||
broadcast_addr = config.get(CONF_BROADCAST)
|
broadcast_addr = config.get(CONF_BROADCAST)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user