import { AiOutlineControl, AiOutlineGateway, AiOutlineAlert, AiOutlineChrome } from 'react-icons/ai'; import { CgSmartHomeBoiler } from 'react-icons/cg'; import { FaSolarPanel } from 'react-icons/fa'; import { GiHeatHaze } from 'react-icons/gi'; import { MdThermostatAuto, MdOutlineSensors, MdOutlineExtension } from 'react-icons/md'; import { TiFlowSwitch } from 'react-icons/ti'; import { VscVmConnect } from 'react-icons/vsc'; import type { FC } from 'react'; interface DeviceIconProps { type_id: number; } // matches emsdevice.h DeviceType const enum DeviceType { SYSTEM = 0, TEMPERATURESENSOR, ANALOGSENSOR, SCHEDULER, BOILER, THERMOSTAT, MIXER, SOLAR, HEATPUMP, GATEWAY, SWITCH, CONTROLLER, CONNECT, ALERT, PUMP, GENERIC, HEATSOURCE, CUSTOM, UNKNOWN } const DeviceIcon: FC = ({ type_id }) => { switch (type_id) { case DeviceType.TEMPERATURESENSOR: case DeviceType.ANALOGSENSOR: return ; case DeviceType.BOILER: case DeviceType.HEATSOURCE: return ; case DeviceType.THERMOSTAT: return ; case DeviceType.MIXER: return ; case DeviceType.SOLAR: return ; case DeviceType.HEATPUMP: return ; case DeviceType.GATEWAY: return ; case DeviceType.SWITCH: return ; case DeviceType.CONTROLLER: case DeviceType.CONNECT: return ; case DeviceType.ALERT: return ; case DeviceType.PUMP: return ; case DeviceType.CUSTOM: return ; default: return null; } }; export default DeviceIcon;