From 93b8eb603a099cb08654defed5b7dfd19b2dcec4 Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Tue, 27 Oct 2026 10:40:35 +0100 Subject: [PATCH] Remove deprecated effect "None" from hue (#188867) Co-authored-by: Claude --- homeassistant/components/hue/strings.json | 6 --- homeassistant/components/hue/v2/light.py | 22 ----------- tests/components/hue/test_light_v2.py | 45 ++--------------------- 3 files changed, 3 insertions(+), 70 deletions(-) diff --git a/homeassistant/components/hue/strings.json b/homeassistant/components/hue/strings.json index 9397307f3433..2bbc7f0f365d 100644 --- a/homeassistant/components/hue/strings.json +++ b/homeassistant/components/hue/strings.json @@ -169,12 +169,6 @@ "message": "Failed to unload the Hue bridge" } }, - "issues": { - "deprecated_effect_none": { - "description": "A light was turned on with the deprecated effect `None`. This has been replaced with `off`. Please update any automations, scenes, or scripts that use this effect.", - "title": "Light turned on with deprecated effect" - } - }, "options": { "step": { "init": { diff --git a/homeassistant/components/hue/v2/light.py b/homeassistant/components/hue/v2/light.py index f1ce2101881d..0b7b54fca062 100644 --- a/homeassistant/components/hue/v2/light.py +++ b/homeassistant/components/hue/v2/light.py @@ -26,11 +26,9 @@ from homeassistant.components.light import ( ) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback -from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue from homeassistant.util import color as color_util from ..bridge import HueBridge, HueConfigEntry -from ..const import DOMAIN from .entity import HueBaseEntity from .helpers import ( normalize_hue_brightness, @@ -42,9 +40,6 @@ FALLBACK_MIN_MIREDS = 153 # hue default for most lights FALLBACK_MAX_MIREDS = 500 # hue default for most lights FALLBACK_KELVIN = 5800 # halfway -# HA 2025.4 replaced the deprecated effect "None" with HA default "off" -DEPRECATED_EFFECT_NONE = "None" - async def async_setup_entry( hass: HomeAssistant, @@ -259,23 +254,6 @@ class HueLight(HueBaseEntity, LightEntity): self._color_temp_active = color_temp is not None flash = kwargs.get(ATTR_FLASH) effect = effect_str = kwargs.get(ATTR_EFFECT) - if effect_str == DEPRECATED_EFFECT_NONE: - # deprecated effect "None" is now "off" - effect_str = EFFECT_OFF - async_create_issue( - self.hass, - DOMAIN, - "deprecated_effect_none", - breaks_in_ha_version="2025.10.0", - is_fixable=False, - severity=IssueSeverity.WARNING, - translation_key="deprecated_effect_none", - ) - self.logger.warning( - "Detected deprecated effect 'None' in %s, use 'off' instead. " - "This will stop working in HA 2025.10", - self.entity_id, - ) if effect_str == EFFECT_OFF: # ignore effect if set to "off" and we have no effect active # the special effect "off" is only used to stop an active effect diff --git a/tests/components/hue/test_light_v2.py b/tests/components/hue/test_light_v2.py index 9f9a1d1aec07..827c3cedc74f 100644 --- a/tests/components/hue/test_light_v2.py +++ b/tests/components/hue/test_light_v2.py @@ -4,14 +4,10 @@ from unittest.mock import Mock import pytest -from homeassistant.components.light import ( - ATTR_EFFECT, - DOMAIN as LIGHT_DOMAIN, - ColorMode, -) -from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_ON, Platform +from homeassistant.components.light import ColorMode +from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.helpers import entity_registry as er, issue_registry as ir +from homeassistant.helpers import entity_registry as er from homeassistant.util import color as color_util from homeassistant.util.json import JsonArrayType @@ -1015,41 +1011,6 @@ async def test_grouped_lights( ) -async def test_light_turn_on_service_deprecation( - hass: HomeAssistant, - mock_bridge_v2: Mock, - v2_resources_test_data: JsonArrayType, - issue_registry: ir.IssueRegistry, -) -> None: - """Test calling the turn on service on a light.""" - await mock_bridge_v2.api.load_test_data(v2_resources_test_data) - - test_light_id = "light.test_room_hue_light_with_color_temperature_only" - - await setup_platform(hass, mock_bridge_v2, Platform.LIGHT) - - event = { - "id": "3a6710fa-4474-4eba-b533-5e6e72968feb", - "type": "light", - "effects": {"status": "candle"}, - } - mock_bridge_v2.api.emit_event("update", event) - await hass.async_block_till_done() - - # test disable effect - # it should send a request with effect set to "no_effect" - await hass.services.async_call( - LIGHT_DOMAIN, - SERVICE_TURN_ON, - { - ATTR_ENTITY_ID: test_light_id, - ATTR_EFFECT: "None", - }, - blocking=True, - ) - assert mock_bridge_v2.mock_requests[0]["json"]["effects"]["effect"] == "no_effect" - - @pytest.mark.parametrize( "entity_id", [