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 = ({