def get_generic_type(type_tag):
    """Map type tag to generic type."""
    return {
        # Alarm
        DEVICE_ALARM: TYPE_ALARM,

        # Binary Sensors - Connectivity
        DEVICE_GLASS_BREAK: TYPE_CONNECTIVITY,
        DEVICE_KEYPAD: TYPE_CONNECTIVITY,
        DEVICE_REMOTE_CONTROLLER: TYPE_CONNECTIVITY,
        DEVICE_SIREN: TYPE_CONNECTIVITY,
        DEVICE_STATUS_DISPLAY: TYPE_CONNECTIVITY,

        # Binary Sensors - Opening
        DEVICE_DOOR_CONTACT: TYPE_OPENING,

        # Cameras
        DEVICE_MOTION_CAMERA: TYPE_CAMERA,
        DEVICE_MOTION_VIDEO_CAMERA: TYPE_CAMERA,
        DEVICE_IP_CAM: TYPE_CAMERA,
        DEVICE_OUTDOOR_MOTION_CAMERA: TYPE_CAMERA,

        # Covers
        DEVICE_SECURE_BARRIER: TYPE_COVER,

        # Lights (Dimmers)
        DEVICE_DIMMER: TYPE_LIGHT,
        DEVICE_DIMMER_METER: TYPE_LIGHT,
        DEVICE_HUE: TYPE_LIGHT,

        # Locks
        DEVICE_DOOR_LOCK: TYPE_LOCK,

        # Moisture
        DEVICE_WATER_SENSOR: TYPE_CONNECTIVITY,

        # Switches
        DEVICE_SWITCH: TYPE_SWITCH,
        DEVICE_NIGHT_SWITCH: TYPE_SWITCH,
        DEVICE_POWER_SWITCH_SENSOR: TYPE_SWITCH,
        DEVICE_POWER_SWITCH_METER: TYPE_SWITCH,

        # Water Valve
        DEVICE_VALVE: TYPE_VALVE,

        # Unknown Sensors
        # More data needed to determine type
        DEVICE_ROOM_SENSOR: TYPE_UNKNOWN_SENSOR,
        DEVICE_TEMPERATURE_SENSOR: TYPE_UNKNOWN_SENSOR,
        DEVICE_MULTI_SENSOR: TYPE_UNKNOWN_SENSOR,
        DEVICE_PIR: TYPE_UNKNOWN_SENSOR,
        DEVICE_POVS: TYPE_UNKNOWN_SENSOR,
    }.get(type_tag.lower(), None)
Map type tag to generic type.