From fb0b9214cc474b0a32ffd111ff13863fe7accf08 Mon Sep 17 00:00:00 2001 From: suu <46421931+0suu@users.noreply.github.com> Date: Tue, 30 Dec 2025 00:58:48 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B7=E3=83=BC=E3=83=AA=E3=83=B3=E3=82=B0?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=88=E3=81=AEon=E3=83=9C=E3=82=BF?= =?UTF-8?q?=E3=83=B3=E3=81=AF=E3=83=A1=E3=82=A4=E3=83=B3=E3=81=AE=E9=9B=BB?= =?UTF-8?q?=E6=B0=97=E3=82=92=E3=81=A4=E3=81=91=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/DeviceControls.tsx | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/DeviceControls.tsx b/src/renderer/src/components/DeviceControls.tsx index 78f9b0a..ef3051b 100644 --- a/src/renderer/src/components/DeviceControls.tsx +++ b/src/renderer/src/components/DeviceControls.tsx @@ -152,12 +152,16 @@ export const DeviceControls: React.FC = ({ const isInfraredRemote = !!(device as any).isInfraredRemote; const normalizedType = useMemo(() => rawType, [rawType]); + const normalizedTypeCompact = useMemo( + () => normalizedType.replace(/[^a-z0-9]/g, ""), + [normalizedType] + ); const isBot = !isInfraredRemote && normalizedType === "bot"; const isPlug = !isInfraredRemote && normalizedType.includes("plug"); const isCurtain = !isInfraredRemote && (normalizedType.includes("curtain") || normalizedType.includes("blind tilt")); const isLock = !isInfraredRemote && normalizedType.includes("lock"); - const isCeilingLight = !isInfraredRemote && definition?.key === "ceilingLight"; + const isCeilingLight = !isInfraredRemote && (definition?.key === "ceilingLight" || normalizedTypeCompact.includes("ceilinglight")); const isFloorLamp = !isInfraredRemote && normalizedType.includes("floor lamp"); const isStripLight3 = !isInfraredRemote && normalizedType.includes("strip light 3"); const isStripLight = !isInfraredRemote && normalizedType.includes("strip light"); @@ -515,7 +519,13 @@ export const DeviceControls: React.FC = ({