mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Only raise issue if switch used in Logitech Harmony Hub (#104941)
This commit is contained in:
parent
5d6791e412
commit
67784def13
@ -23,15 +23,6 @@ async def async_setup_entry(
|
||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
) -> None:
|
||||
"""Set up harmony activity switches."""
|
||||
async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"deprecated_switches",
|
||||
breaks_in_ha_version="2024.6.0",
|
||||
is_fixable=False,
|
||||
severity=IssueSeverity.WARNING,
|
||||
translation_key="deprecated_switches",
|
||||
)
|
||||
data = hass.data[DOMAIN][entry.entry_id][HARMONY_DATA]
|
||||
activities = data.activities
|
||||
|
||||
@ -65,10 +56,28 @@ class HarmonyActivitySwitch(HarmonyEntity, SwitchEntity):
|
||||
|
||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||
"""Start this activity."""
|
||||
async_create_issue(
|
||||
self.hass,
|
||||
DOMAIN,
|
||||
"deprecated_switches",
|
||||
breaks_in_ha_version="2024.6.0",
|
||||
is_fixable=False,
|
||||
severity=IssueSeverity.WARNING,
|
||||
translation_key="deprecated_switches",
|
||||
)
|
||||
await self._data.async_start_activity(self._activity_name)
|
||||
|
||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||
"""Stop this activity."""
|
||||
async_create_issue(
|
||||
self.hass,
|
||||
DOMAIN,
|
||||
"deprecated_switches",
|
||||
breaks_in_ha_version="2024.6.0",
|
||||
is_fixable=False,
|
||||
severity=IssueSeverity.WARNING,
|
||||
translation_key="deprecated_switches",
|
||||
)
|
||||
await self._data.async_power_off()
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user