From ed09e07bdd59ea30d159e57afa48cfba171ab140 Mon Sep 17 00:00:00 2001 From: abmantis Date: Mon, 23 Feb 2026 21:33:42 +0000 Subject: [PATCH] Update kitchen_sink --- homeassistant/components/kitchen_sink/fan.py | 6 ++++-- homeassistant/components/kitchen_sink/infrared.py | 6 ++++-- homeassistant/components/kitchen_sink/manifest.json | 1 - tests/components/kitchen_sink/test_infrared.py | 7 +++++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/kitchen_sink/fan.py b/homeassistant/components/kitchen_sink/fan.py index 6e2b59a49ba..db02da6930c 100644 --- a/homeassistant/components/kitchen_sink/fan.py +++ b/homeassistant/components/kitchen_sink/fan.py @@ -4,8 +4,10 @@ from __future__ import annotations from typing import Any +import infrared_protocols + from homeassistant.components.fan import FanEntity, FanEntityFeature -from homeassistant.components.infrared import NECInfraredCommand, async_send_command +from homeassistant.components.infrared import async_send_command from homeassistant.config_entries import ConfigEntry from homeassistant.const import STATE_UNAVAILABLE from homeassistant.core import Event, EventStateChangedData, HomeAssistant, callback @@ -102,7 +104,7 @@ class DemoInfraredFan(FanEntity): async def _send_command(self, command_code: int) -> None: """Send an IR command using the NEC protocol.""" - command = NECInfraredCommand( + command = infrared_protocols.NECCommand( address=DUMMY_FAN_ADDRESS, command=command_code, modulation=38000, diff --git a/homeassistant/components/kitchen_sink/infrared.py b/homeassistant/components/kitchen_sink/infrared.py index cef290103f7..4f93c9be0c5 100644 --- a/homeassistant/components/kitchen_sink/infrared.py +++ b/homeassistant/components/kitchen_sink/infrared.py @@ -2,8 +2,10 @@ from __future__ import annotations +import infrared_protocols + from homeassistant.components import persistent_notification -from homeassistant.components.infrared import InfraredCommand, InfraredEntity +from homeassistant.components.infrared import InfraredEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.device_registry import DeviceInfo @@ -51,7 +53,7 @@ class DemoInfrared(InfraredEntity): ) self._attr_name = entity_name - async def async_send_command(self, command: InfraredCommand) -> None: + async def async_send_command(self, command: infrared_protocols.Command) -> None: """Send an IR command.""" timings = [ interval diff --git a/homeassistant/components/kitchen_sink/manifest.json b/homeassistant/components/kitchen_sink/manifest.json index cf0e77646ac..4cf532d72ff 100644 --- a/homeassistant/components/kitchen_sink/manifest.json +++ b/homeassistant/components/kitchen_sink/manifest.json @@ -3,7 +3,6 @@ "name": "Everything but the Kitchen Sink", "after_dependencies": ["recorder"], "codeowners": ["@home-assistant/core"], - "dependencies": ["infrared"], "documentation": "https://www.home-assistant.io/integrations/kitchen_sink", "iot_class": "calculated", "preview_features": { diff --git a/tests/components/kitchen_sink/test_infrared.py b/tests/components/kitchen_sink/test_infrared.py index 76772ce9bdd..0783087dc21 100644 --- a/tests/components/kitchen_sink/test_infrared.py +++ b/tests/components/kitchen_sink/test_infrared.py @@ -3,9 +3,10 @@ from unittest.mock import patch from freezegun.api import FrozenDateTimeFactory +import infrared_protocols import pytest -from homeassistant.components.infrared import NECInfraredCommand, async_send_command +from homeassistant.components.infrared import async_send_command from homeassistant.components.kitchen_sink import DOMAIN from homeassistant.const import STATE_UNKNOWN, Platform from homeassistant.core import HomeAssistant @@ -44,7 +45,9 @@ async def test_send_command( assert now is not None freezer.move_to(now) - command = NECInfraredCommand(address=0x04, command=0x08, modulation=38000) + command = infrared_protocols.NECCommand( + address=0x04, command=0x08, modulation=38000 + ) await async_send_command(hass, ENTITY_IR_TRANSMITTER, command) state = hass.states.get(ENTITY_IR_TRANSMITTER)