Deprecate Nanoleaf gesture device trigger (#120078)
This commit is contained in:
parent
bbb8bb31f9
commit
72d1b3e360
2 changed files with 16 additions and 0 deletions
|
@ -16,6 +16,7 @@ from homeassistant.const import (
|
||||||
)
|
)
|
||||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant
|
from homeassistant.core import CALLBACK_TYPE, HomeAssistant
|
||||||
from homeassistant.helpers import device_registry as dr
|
from homeassistant.helpers import device_registry as dr
|
||||||
|
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
||||||
from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo
|
from homeassistant.helpers.trigger import TriggerActionType, TriggerInfo
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
|
@ -60,6 +61,15 @@ async def async_attach_trigger(
|
||||||
trigger_info: TriggerInfo,
|
trigger_info: TriggerInfo,
|
||||||
) -> CALLBACK_TYPE:
|
) -> CALLBACK_TYPE:
|
||||||
"""Attach a trigger."""
|
"""Attach a trigger."""
|
||||||
|
async_create_issue(
|
||||||
|
hass,
|
||||||
|
DOMAIN,
|
||||||
|
"deprecated_device_trigger_nanoleaf",
|
||||||
|
is_fixable=False,
|
||||||
|
breaks_in_ha_version="2025.1.0",
|
||||||
|
severity=IssueSeverity.WARNING,
|
||||||
|
translation_key="deprecated_device_trigger",
|
||||||
|
)
|
||||||
event_config = event_trigger.TRIGGER_SCHEMA(
|
event_config = event_trigger.TRIGGER_SCHEMA(
|
||||||
{
|
{
|
||||||
event_trigger.CONF_PLATFORM: CONF_EVENT,
|
event_trigger.CONF_PLATFORM: CONF_EVENT,
|
||||||
|
|
|
@ -52,5 +52,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"issues": {
|
||||||
|
"deprecated_device_trigger": {
|
||||||
|
"title": "Nanoleaf device trigger is deprecated",
|
||||||
|
"description": "The Nanoleaf device trigger is deprecated and will be removed in a future release. You can now use the gesture event entity to build automations."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue