From 364ecc191e58a2ef0375166334f9251c5cc0b808 Mon Sep 17 00:00:00 2001 From: Paul Tarjan <40143+ptarjan@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:36:43 -0700 Subject: [PATCH] Deprecate implicit Wake-On-LAN in Samsung TV integration (#158740) Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> --- homeassistant/components/samsungtv/entity.py | 19 +++++++++++++++---- .../components/samsungtv/media_player.py | 2 +- .../components/samsungtv/strings.json | 6 ++++++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/samsungtv/entity.py b/homeassistant/components/samsungtv/entity.py index 59c4f71d9c8..82157a7365b 100644 --- a/homeassistant/components/samsungtv/entity.py +++ b/homeassistant/components/samsungtv/entity.py @@ -14,7 +14,7 @@ from homeassistant.const import ( CONF_MODEL, ) from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers import device_registry as dr +from homeassistant.helpers import device_registry as dr, issue_registry as ir from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.entity import Entity from homeassistant.helpers.trigger import PluggableAction @@ -24,6 +24,8 @@ from .const import CONF_MANUFACTURER, DOMAIN, LOGGER from .coordinator import SamsungTVDataUpdateCoordinator from .triggers.turn_on import async_get_turn_on_trigger +DEPRECATED_IMPLICIT_WAKE_ON_LAN = "deprecated_implicit_wake_on_lan_{}" + class SamsungTVEntity(CoordinatorEntity[SamsungTVDataUpdateCoordinator], Entity): """Defines a base SamsungTV entity.""" @@ -92,9 +94,18 @@ class SamsungTVEntity(CoordinatorEntity[SamsungTVDataUpdateCoordinator], Entity) LOGGER.debug("Attempting to turn on %s via automation", self.entity_id) await self._turn_on_action.async_run(self.hass, self._context) elif self._mac: - LOGGER.debug( - "Attempting to turn on %s via Wake-On-Lan", - self.entity_id, + ir.async_create_issue( + self.hass, + DOMAIN, + DEPRECATED_IMPLICIT_WAKE_ON_LAN.format(self._mac), + is_fixable=False, + breaks_in_ha_version="2026.8.0", + severity=ir.IssueSeverity.WARNING, + translation_key="deprecated_implicit_wake_on_lan", + translation_placeholders={ + "mac_address": self._mac, + "wol_documentation_url": "https://www.home-assistant.io/integrations/wake_on_lan/", + }, ) await self.hass.async_add_executor_job(self._wake_on_lan) else: diff --git a/homeassistant/components/samsungtv/media_player.py b/homeassistant/components/samsungtv/media_player.py index fa4f04a97ec..56eb0abd9f5 100644 --- a/homeassistant/components/samsungtv/media_player.py +++ b/homeassistant/components/samsungtv/media_player.py @@ -97,7 +97,7 @@ class SamsungTVDevice(SamsungTVEntity, MediaPlayerEntity): self._attr_supported_features = SUPPORT_SAMSUNGTV if self._mac: - # (deprecated) add turn-on if mac is available + # Deprecated: Implicit Wake-On-LAN, will be removed in 2026.8.0 # Triggers have not yet been registered so this is adjusted in the property self._attr_supported_features |= MediaPlayerEntityFeature.TURN_ON if self._ssdp_rendering_control_location: diff --git a/homeassistant/components/samsungtv/strings.json b/homeassistant/components/samsungtv/strings.json index f3c5f9ef2cb..75292e4d438 100644 --- a/homeassistant/components/samsungtv/strings.json +++ b/homeassistant/components/samsungtv/strings.json @@ -80,5 +80,11 @@ "unhandled_trigger_type": { "message": "Unhandled trigger type {trigger_type}." } + }, + "issues": { + "deprecated_implicit_wake_on_lan": { + "description": "Implicit Wake-On-LAN is deprecated and will be removed in a future version of Home Assistant. Please create an explicit Wake-On-LAN automation to turn on your TV, targeting MAC address `{mac_address}`.\n\nFor more information, see the [Wake-On-LAN documentation]({wol_documentation_url}).", + "title": "Implicit Wake-On-LAN is deprecated" + } } }