"""Constants for the Multilevel Sensor CC."""

# ----------------------------------------------------------------------------------- #
# **BEGINNING OF AUTOGENERATED CONTENT** (TO ADD ADDITIONAL MANUAL CONTENT, LOOK FOR  #
# THE "END OF AUTOGENERATED CONTENT" COMMENT BLOCK AND ADD YOUR CODE BELOW IT)        #
# ----------------------------------------------------------------------------------- #

from enum import IntEnum
from typing import Dict, Set, Type, Union

CC_SPECIFIC_SCALE = "scale"
CC_SPECIFIC_SENSOR_TYPE = "sensorType"


class MultilevelSensorType(IntEnum):
    """Enum for known multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    ACCELERATION_X_AXIS = 52
    ACCELERATION_Y_AXIS = 53
    ACCELERATION_Z_AXIS = 54
    AIR_FLOW = 18
    AIR_TEMPERATURE = 1
    AMMONIA = 84
    ANGLE_POSITION = 21
    APPLIED_FORCE_ON_THE_SENSOR = 71
    ATMOSPHERIC_PRESSURE = 8
    BAROMETRIC_PRESSURE = 9
    BASIS_METABOLIC_RATE = 50
    BLOOD_PRESSURE = 45
    BODY_MASS_INDEX = 51
    BOILER_WATER_TEMPERATURE = 62
    BONE_MASS = 48
    CARBON_DIOXIDE_LEVEL = 17
    CARBON_MONOXIDE_LEVEL = 40
    CONDENSER_COIL_TEMPERATURE = 74
    CURRENT = 16
    DEFROST_TEMPERATURE = 80
    DEW_POINT = 11
    DIRECTION = 7
    DISCHARGE_LINE_TEMPERATURE = 77
    DISCHARGE_PRESSURE = 79
    DISTANCE = 20
    DOMESTIC_HOT_WATER_TEMPERATURE = 63
    ELECTRICAL_CONDUCTIVITY = 29
    ELECTRICAL_RESISTIVITY = 28
    EVAPORATOR_COIL_TEMPERATURE = 75
    EXHAUST_TEMPERATURE = 65
    FAT_MASS = 47
    FORMALDEHYDE_LEVEL = 36
    FREQUENCY = 32
    GENERAL_PURPOSE = 2
    HEART_RATE = 44
    HEART_RATE_LF_HF_RATIO = 69
    HUMIDITY = 5
    ILLUMINANCE = 3
    LEAD = 85
    LIQUID_LINE_TEMPERATURE = 76
    LOUDNESS = 30
    METHANE_DENSITY = 38
    MOISTURE = 31
    MOTION_DIRECTION = 70
    MUSCLE_MASS = 46
    NITROGEN_DIOXIDE = 83
    OUTSIDE_TEMPERATURE = 64
    OZONE = 81
    PARTICULATE_MATTER_1 = 86
    PARTICULATE_MATTER_10 = 59
    PARTICULATE_MATTER_2_5 = 35
    PERSON_COUNTER_ENTERING = 87
    PERSON_COUNTER_EXITING = 88
    POWER = 4
    RADON_CONCENTRATION = 37
    RAIN_RATE = 12
    RELATIVE_MODULATION_LEVEL = 61
    RESPIRATORY_RATE = 60
    RETURN_AIR_TEMPERATURE = 72
    RF_SIGNAL_STRENGTH = 58
    ROTATION = 22
    SEISMIC_INTENSITY = 25
    SEISMIC_MAGNITUDE = 26
    SMOKE_DENSITY = 55
    SOIL_HUMIDITY = 41
    SOIL_REACTIVITY = 42
    SOIL_SALINITY = 43
    SOIL_TEMPERATURE = 24
    SOLAR_RADIATION = 10
    SUCTION_PRESSURE = 78
    SULFUR_DIOXIDE = 82
    SUPPLY_AIR_TEMPERATURE = 73
    TANK_CAPACITY = 19
    TARGET_TEMPERATURE = 34
    TIDE_LEVEL = 13
    TIME = 33
    TOTAL_BODY_WATER = 49
    ULTRAVIOLET = 27
    VELOCITY = 6
    VOLATILE_ORGANIC_COMPOUND_LEVEL = 39
    VOLTAGE = 15
    WATER_ACIDITY = 67
    WATER_CHLORINE_LEVEL = 66
    WATER_FLOW = 56
    WATER_OXIDATION_REDUCTION_POTENTIAL = 68
    WATER_PRESSURE = 57
    WATER_TEMPERATURE = 23
    WEIGHT = 14


class AirFlowScale(IntEnum):
    """Enum for known scales for AIR_FLOW multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    CUBIC_FEET_PER_MINUTE = 1
    CUBIC_METER_PER_HOUR = 0


class AnglePositionScale(IntEnum):
    """Enum for known scales for ANGLE_POSITION multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    DEGREES_RELATIVE_TO_NORTH_POLE_OF_STANDING_EYE_VIEW = 1
    DEGREES_RELATIVE_TO_SOUTH_POLE_OF_STANDING_EYE_VIEW = 2
    PERCENTAGE_VALUE = 0


class AppliedForceOnTheSensorScale(IntEnum):
    """Enum for known scales for APPLIED_FORCE_ON_THE_SENSOR multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    NEWTON = 0


class AccelerationScale(IntEnum):
    """Enum for known scales for Acceleration multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    METER_PER_SQUARE_SECOND = 0


class AcidityScale(IntEnum):
    """Enum for known scales for Acidity multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    ACIDITY = 0


class AirPressureScale(IntEnum):
    """Enum for known scales for Air Pressure multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    INCHES_OF_MERCURY = 1
    KILOPASCAL = 0


class BasisMetabolicRateScale(IntEnum):
    """Enum for known scales for BASIS_METABOLIC_RATE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    JOULE = 0


class BloodPressureScale(IntEnum):
    """Enum for known scales for BLOOD_PRESSURE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    DIASTOLIC = 1
    SYSTOLIC = 0


class BodyMassIndexScale(IntEnum):
    """Enum for known scales for BODY_MASS_INDEX multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    BODY_MASS_INDEX = 0


class CarbonDioxideLevelScale(IntEnum):
    """Enum for known scales for CARBON_DIOXIDE_LEVEL multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    PARTS_MILLION = 0


class CarbonMonoxideLevelScale(IntEnum):
    """Enum for known scales for CARBON_MONOXIDE_LEVEL multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MOLE_PER_CUBIC_METER = 0
    PARTS_MILLION = 1


class CurrentScale(IntEnum):
    """Enum for known scales for CURRENT multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    AMPERE = 0
    MILLIAMPERE = 1


class DistanceScale(IntEnum):
    """Enum for known scales for DISTANCE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    CENTIMETER = 1
    FEET = 2
    METER = 0


class DensityScale(IntEnum):
    """Enum for known scales for Density multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    DENSITY = 0


class DirectionScale(IntEnum):
    """Enum for known scales for Direction multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    DEGREES = 0


class ElectricalConductivityScale(IntEnum):
    """Enum for known scales for ELECTRICAL_CONDUCTIVITY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    SIEMENS_PER_METER = 0


class ElectricalResistivityScale(IntEnum):
    """Enum for known scales for ELECTRICAL_RESISTIVITY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    OHM_METER = 0


class FormaldehydeLevelScale(IntEnum):
    """Enum for known scales for FORMALDEHYDE_LEVEL multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MOLE_PER_CUBIC_METER = 0


class FrequencyScale(IntEnum):
    """Enum for known scales for FREQUENCY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    HERTZ = 0
    KILOHERTZ = 1


class GeneralPurposeScale(IntEnum):
    """Enum for known scales for GENERAL_PURPOSE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    DIMENSIONLESS_VALUE = 1
    PERCENTAGE_VALUE = 0


class HeartRateScale(IntEnum):
    """Enum for known scales for HEART_RATE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    BEATS_PER_MINUTE = 0


class HumidityScale(IntEnum):
    """Enum for known scales for HUMIDITY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    ABSOLUTE_HUMIDITY = 1
    PERCENTAGE_VALUE = 0


class IlluminanceScale(IntEnum):
    """Enum for known scales for ILLUMINANCE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    LUX = 1
    PERCENTAGE_VALUE = 0


class LoudnessScale(IntEnum):
    """Enum for known scales for LOUDNESS multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    A_WEIGHTED_DECIBELS = 1
    DECIBEL = 0


class MethaneDensityScale(IntEnum):
    """Enum for known scales for METHANE_DENSITY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MOLE_PER_CUBIC_METER = 0


class MoistureScale(IntEnum):
    """Enum for known scales for MOISTURE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    IMPEDANCE = 2
    PERCENTAGE_VALUE = 0
    VOLUME_WATER_CONTENT = 1
    WATER_ACTIVITY = 3


class MassScale(IntEnum):
    """Enum for known scales for Mass multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    KILOGRAM = 0


class ParticulateMatter10Scale(IntEnum):
    """Enum for known scales for PARTICULATE_MATTER_10 multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MICROGRAM_PER_CUBIC_METER = 1
    MOLE_PER_CUBIC_METER = 0


class ParticulateMatter25Scale(IntEnum):
    """Enum for known scales for PARTICULATE_MATTER_2_5 multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MICROGRAM_PER_CUBIC_METER = 1
    MOLE_PER_CUBIC_METER = 0


class PowerScale(IntEnum):
    """Enum for known scales for POWER multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    BTU_H = 1
    WATT = 0


class PercentageScale(IntEnum):
    """Enum for known scales for Percentage multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    PERCENTAGE_VALUE = 0


class PressureScale(IntEnum):
    """Enum for known scales for Pressure multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    KILOPASCAL = 0
    POUND_PER_SQUARE_INCH = 1


class RadonConcentrationScale(IntEnum):
    """Enum for known scales for RADON_CONCENTRATION multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    BECQUEREL_PER_CUBIC_METER = 0
    PICOCURIES_PER_LITER = 1


class RainRateScale(IntEnum):
    """Enum for known scales for RAIN_RATE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    INCHES_PER_HOUR = 1
    MILLIMETER_HOUR = 0


class RespiratoryRateScale(IntEnum):
    """Enum for known scales for RESPIRATORY_RATE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    BREATHS_PER_MINUTE = 0


class RfSignalStrengthScale(IntEnum):
    """Enum for known scales for RF_SIGNAL_STRENGTH multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    POWER_LEVEL = 1
    RSSI = 0


class RotationScale(IntEnum):
    """Enum for known scales for ROTATION multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    HERTZ = 1
    REVOLUTIONS_PER_MINUTE = 0


class SeismicIntensityScale(IntEnum):
    """Enum for known scales for SEISMIC_INTENSITY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    EUROPEAN_MACROSEISMIC = 1
    LIEDU = 2
    MERCALLI = 0
    SHINDO = 3


class SeismicMagnitudeScale(IntEnum):
    """Enum for known scales for SEISMIC_MAGNITUDE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    BODY_WAVE = 3
    LOCAL = 0
    MOMENT = 1
    SURFACE_WAVE = 2


class SoilSalinityScale(IntEnum):
    """Enum for known scales for SOIL_SALINITY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MOLE_PER_CUBIC_METER = 0


class SolarRadiationScale(IntEnum):
    """Enum for known scales for SOLAR_RADIATION multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    WATT_PER_SQUARE_METER = 0


class TankCapacityScale(IntEnum):
    """Enum for known scales for TANK_CAPACITY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    CUBIC_METER = 1
    GALLONS = 2
    LITER = 0


class TideLevelScale(IntEnum):
    """Enum for known scales for TIDE_LEVEL multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    FEET = 1
    METER = 0


class TimeScale(IntEnum):
    """Enum for known scales for TIME multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    SECOND = 0


class TemperatureScale(IntEnum):
    """Enum for known scales for Temperature multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    CELSIUS = 0
    FAHRENHEIT = 1


class UltravioletScale(IntEnum):
    """Enum for known scales for ULTRAVIOLET multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    UV_INDEX = 0


class UnitlessScale(IntEnum):
    """Enum for known scales for Unitless multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    UNITLESS = 0


class VelocityScale(IntEnum):
    """Enum for known scales for VELOCITY multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MPH = 1
    M_S = 0


class VolatileOrganicCompoundLevelScale(IntEnum):
    """Enum for known scales for VOLATILE_ORGANIC_COMPOUND_LEVEL multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MOLE_PER_CUBIC_METER = 0
    PARTS_MILLION = 1


class VoltageScale(IntEnum):
    """Enum for known scales for VOLTAGE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MILLIVOLT = 1
    VOLT = 0


class WaterChlorineLevelScale(IntEnum):
    """Enum for known scales for WATER_CHLORINE_LEVEL multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MILLIGRAM_PER_LITER = 0


class WaterFlowScale(IntEnum):
    """Enum for known scales for WATER_FLOW multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    LITER_PER_HOUR = 0


class WaterOxidationReductionPotentialScale(IntEnum):
    """Enum for known scales for WATER_OXIDATION_REDUCTION_POTENTIAL multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    MILLIVOLT = 0


class WaterPressureScale(IntEnum):
    """Enum for known scales for WATER_PRESSURE multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    KILOPASCAL = 0


class WeightScale(IntEnum):
    """Enum for known scales for WEIGHT multilevel sensor types."""

    # https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/sensorTypes.json
    KILOGRAM = 0
    POUNDS = 1


MultilevelSensorScaleType = Union[
    AccelerationScale,
    AcidityScale,
    AirFlowScale,
    AirPressureScale,
    AnglePositionScale,
    AppliedForceOnTheSensorScale,
    BasisMetabolicRateScale,
    BloodPressureScale,
    BodyMassIndexScale,
    CarbonDioxideLevelScale,
    CarbonMonoxideLevelScale,
    CurrentScale,
    DensityScale,
    DirectionScale,
    DistanceScale,
    ElectricalConductivityScale,
    ElectricalResistivityScale,
    FormaldehydeLevelScale,
    FrequencyScale,
    GeneralPurposeScale,
    HeartRateScale,
    HumidityScale,
    IlluminanceScale,
    LoudnessScale,
    MassScale,
    MethaneDensityScale,
    MoistureScale,
    ParticulateMatter10Scale,
    ParticulateMatter25Scale,
    PercentageScale,
    PowerScale,
    PressureScale,
    RadonConcentrationScale,
    RainRateScale,
    RespiratoryRateScale,
    RfSignalStrengthScale,
    RotationScale,
    SeismicIntensityScale,
    SeismicMagnitudeScale,
    SoilSalinityScale,
    SolarRadiationScale,
    TankCapacityScale,
    TemperatureScale,
    TideLevelScale,
    TimeScale,
    UltravioletScale,
    UnitlessScale,
    VelocityScale,
    VolatileOrganicCompoundLevelScale,
    VoltageScale,
    WaterChlorineLevelScale,
    WaterFlowScale,
    WaterOxidationReductionPotentialScale,
    WaterPressureScale,
    WeightScale,
]

MULTILEVEL_SENSOR_TYPE_TO_SCALE_MAP: Dict[
    MultilevelSensorType, Type[MultilevelSensorScaleType]
] = {
    MultilevelSensorType.ACCELERATION_X_AXIS: AccelerationScale,
    MultilevelSensorType.ACCELERATION_Y_AXIS: AccelerationScale,
    MultilevelSensorType.ACCELERATION_Z_AXIS: AccelerationScale,
    MultilevelSensorType.AIR_FLOW: AirFlowScale,
    MultilevelSensorType.AIR_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.AMMONIA: DensityScale,
    MultilevelSensorType.ANGLE_POSITION: AnglePositionScale,
    MultilevelSensorType.APPLIED_FORCE_ON_THE_SENSOR: AppliedForceOnTheSensorScale,
    MultilevelSensorType.ATMOSPHERIC_PRESSURE: AirPressureScale,
    MultilevelSensorType.BAROMETRIC_PRESSURE: AirPressureScale,
    MultilevelSensorType.BASIS_METABOLIC_RATE: BasisMetabolicRateScale,
    MultilevelSensorType.BLOOD_PRESSURE: BloodPressureScale,
    MultilevelSensorType.BODY_MASS_INDEX: BodyMassIndexScale,
    MultilevelSensorType.BOILER_WATER_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.BONE_MASS: MassScale,
    MultilevelSensorType.CARBON_DIOXIDE_LEVEL: CarbonDioxideLevelScale,
    MultilevelSensorType.CARBON_MONOXIDE_LEVEL: CarbonMonoxideLevelScale,
    MultilevelSensorType.CONDENSER_COIL_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.CURRENT: CurrentScale,
    MultilevelSensorType.DEFROST_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.DEW_POINT: TemperatureScale,
    MultilevelSensorType.DIRECTION: DirectionScale,
    MultilevelSensorType.DISCHARGE_LINE_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.DISCHARGE_PRESSURE: PressureScale,
    MultilevelSensorType.DISTANCE: DistanceScale,
    MultilevelSensorType.DOMESTIC_HOT_WATER_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.ELECTRICAL_CONDUCTIVITY: ElectricalConductivityScale,
    MultilevelSensorType.ELECTRICAL_RESISTIVITY: ElectricalResistivityScale,
    MultilevelSensorType.EVAPORATOR_COIL_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.EXHAUST_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.FAT_MASS: MassScale,
    MultilevelSensorType.FORMALDEHYDE_LEVEL: FormaldehydeLevelScale,
    MultilevelSensorType.FREQUENCY: FrequencyScale,
    MultilevelSensorType.GENERAL_PURPOSE: GeneralPurposeScale,
    MultilevelSensorType.HEART_RATE: HeartRateScale,
    MultilevelSensorType.HEART_RATE_LF_HF_RATIO: UnitlessScale,
    MultilevelSensorType.HUMIDITY: HumidityScale,
    MultilevelSensorType.ILLUMINANCE: IlluminanceScale,
    MultilevelSensorType.LEAD: DensityScale,
    MultilevelSensorType.LIQUID_LINE_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.LOUDNESS: LoudnessScale,
    MultilevelSensorType.METHANE_DENSITY: MethaneDensityScale,
    MultilevelSensorType.MOISTURE: MoistureScale,
    MultilevelSensorType.MOTION_DIRECTION: DirectionScale,
    MultilevelSensorType.MUSCLE_MASS: MassScale,
    MultilevelSensorType.NITROGEN_DIOXIDE: DensityScale,
    MultilevelSensorType.OUTSIDE_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.OZONE: DensityScale,
    MultilevelSensorType.PARTICULATE_MATTER_1: DensityScale,
    MultilevelSensorType.PARTICULATE_MATTER_10: ParticulateMatter10Scale,
    MultilevelSensorType.PARTICULATE_MATTER_2_5: ParticulateMatter25Scale,
    MultilevelSensorType.PERSON_COUNTER_ENTERING: UnitlessScale,
    MultilevelSensorType.PERSON_COUNTER_EXITING: UnitlessScale,
    MultilevelSensorType.POWER: PowerScale,
    MultilevelSensorType.RADON_CONCENTRATION: RadonConcentrationScale,
    MultilevelSensorType.RAIN_RATE: RainRateScale,
    MultilevelSensorType.RELATIVE_MODULATION_LEVEL: PercentageScale,
    MultilevelSensorType.RESPIRATORY_RATE: RespiratoryRateScale,
    MultilevelSensorType.RETURN_AIR_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.RF_SIGNAL_STRENGTH: RfSignalStrengthScale,
    MultilevelSensorType.ROTATION: RotationScale,
    MultilevelSensorType.SEISMIC_INTENSITY: SeismicIntensityScale,
    MultilevelSensorType.SEISMIC_MAGNITUDE: SeismicMagnitudeScale,
    MultilevelSensorType.SMOKE_DENSITY: PercentageScale,
    MultilevelSensorType.SOIL_HUMIDITY: PercentageScale,
    MultilevelSensorType.SOIL_REACTIVITY: AcidityScale,
    MultilevelSensorType.SOIL_SALINITY: SoilSalinityScale,
    MultilevelSensorType.SOIL_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.SOLAR_RADIATION: SolarRadiationScale,
    MultilevelSensorType.SUCTION_PRESSURE: PressureScale,
    MultilevelSensorType.SULFUR_DIOXIDE: DensityScale,
    MultilevelSensorType.SUPPLY_AIR_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.TANK_CAPACITY: TankCapacityScale,
    MultilevelSensorType.TARGET_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.TIDE_LEVEL: TideLevelScale,
    MultilevelSensorType.TIME: TimeScale,
    MultilevelSensorType.TOTAL_BODY_WATER: MassScale,
    MultilevelSensorType.ULTRAVIOLET: UltravioletScale,
    MultilevelSensorType.VELOCITY: VelocityScale,
    MultilevelSensorType.VOLATILE_ORGANIC_COMPOUND_LEVEL: VolatileOrganicCompoundLevelScale,
    MultilevelSensorType.VOLTAGE: VoltageScale,
    MultilevelSensorType.WATER_ACIDITY: AcidityScale,
    MultilevelSensorType.WATER_CHLORINE_LEVEL: WaterChlorineLevelScale,
    MultilevelSensorType.WATER_FLOW: WaterFlowScale,
    MultilevelSensorType.WATER_OXIDATION_REDUCTION_POTENTIAL: WaterOxidationReductionPotentialScale,
    MultilevelSensorType.WATER_PRESSURE: WaterPressureScale,
    MultilevelSensorType.WATER_TEMPERATURE: TemperatureScale,
    MultilevelSensorType.WEIGHT: WeightScale,
}

UNIT_ABSOLUTE_HUMIDITY: Set[MultilevelSensorScaleType] = {
    HumidityScale.ABSOLUTE_HUMIDITY
}
UNIT_ACIDITY: Set[MultilevelSensorScaleType] = {AcidityScale.ACIDITY}
UNIT_AMPERE: Set[MultilevelSensorScaleType] = {CurrentScale.AMPERE}
UNIT_A_WEIGHTED_DECIBELS: Set[MultilevelSensorScaleType] = {
    LoudnessScale.A_WEIGHTED_DECIBELS
}
UNIT_BEATS_PER_MINUTE: Set[MultilevelSensorScaleType] = {
    HeartRateScale.BEATS_PER_MINUTE
}
UNIT_BECQUEREL_PER_CUBIC_METER: Set[MultilevelSensorScaleType] = {
    RadonConcentrationScale.BECQUEREL_PER_CUBIC_METER
}
UNIT_BODY_MASS_INDEX: Set[MultilevelSensorScaleType] = {
    BodyMassIndexScale.BODY_MASS_INDEX
}
UNIT_BODY_WAVE: Set[MultilevelSensorScaleType] = {SeismicMagnitudeScale.BODY_WAVE}
UNIT_BREATHS_PER_MINUTE: Set[MultilevelSensorScaleType] = {
    RespiratoryRateScale.BREATHS_PER_MINUTE
}
UNIT_BTU_H: Set[MultilevelSensorScaleType] = {PowerScale.BTU_H}
UNIT_CELSIUS: Set[MultilevelSensorScaleType] = {TemperatureScale.CELSIUS}
UNIT_CENTIMETER: Set[MultilevelSensorScaleType] = {DistanceScale.CENTIMETER}
UNIT_CUBIC_FEET_PER_MINUTE: Set[MultilevelSensorScaleType] = {
    AirFlowScale.CUBIC_FEET_PER_MINUTE
}
UNIT_CUBIC_METER: Set[MultilevelSensorScaleType] = {TankCapacityScale.CUBIC_METER}
UNIT_CUBIC_METER_PER_HOUR: Set[MultilevelSensorScaleType] = {
    AirFlowScale.CUBIC_METER_PER_HOUR
}
UNIT_DECIBEL: Set[MultilevelSensorScaleType] = {LoudnessScale.DECIBEL}
UNIT_DEGREES: Set[MultilevelSensorScaleType] = {DirectionScale.DEGREES}
UNIT_DEGREES_RELATIVE_TO_NORTH_POLE_OF_STANDING_EYE_VIEW: Set[
    MultilevelSensorScaleType
] = {AnglePositionScale.DEGREES_RELATIVE_TO_NORTH_POLE_OF_STANDING_EYE_VIEW}
UNIT_DEGREES_RELATIVE_TO_SOUTH_POLE_OF_STANDING_EYE_VIEW: Set[
    MultilevelSensorScaleType
] = {AnglePositionScale.DEGREES_RELATIVE_TO_SOUTH_POLE_OF_STANDING_EYE_VIEW}
UNIT_DENSITY: Set[MultilevelSensorScaleType] = {DensityScale.DENSITY}
UNIT_DIASTOLIC: Set[MultilevelSensorScaleType] = {BloodPressureScale.DIASTOLIC}
UNIT_DIMENSIONLESS_VALUE: Set[MultilevelSensorScaleType] = {
    GeneralPurposeScale.DIMENSIONLESS_VALUE
}
UNIT_EUROPEAN_MACROSEISMIC: Set[MultilevelSensorScaleType] = {
    SeismicIntensityScale.EUROPEAN_MACROSEISMIC
}
UNIT_FAHRENHEIT: Set[MultilevelSensorScaleType] = {TemperatureScale.FAHRENHEIT}
UNIT_FEET: Set[MultilevelSensorScaleType] = {DistanceScale.FEET, TideLevelScale.FEET}
UNIT_GALLONS: Set[MultilevelSensorScaleType] = {TankCapacityScale.GALLONS}
UNIT_HERTZ: Set[MultilevelSensorScaleType] = {FrequencyScale.HERTZ, RotationScale.HERTZ}
UNIT_IMPEDANCE: Set[MultilevelSensorScaleType] = {MoistureScale.IMPEDANCE}
UNIT_INCHES_OF_MERCURY: Set[MultilevelSensorScaleType] = {
    AirPressureScale.INCHES_OF_MERCURY
}
UNIT_INCHES_PER_HOUR: Set[MultilevelSensorScaleType] = {RainRateScale.INCHES_PER_HOUR}
UNIT_JOULE: Set[MultilevelSensorScaleType] = {BasisMetabolicRateScale.JOULE}
UNIT_KILOGRAM: Set[MultilevelSensorScaleType] = {
    MassScale.KILOGRAM,
    WeightScale.KILOGRAM,
}
UNIT_KILOHERTZ: Set[MultilevelSensorScaleType] = {FrequencyScale.KILOHERTZ}
UNIT_KILOPASCAL: Set[MultilevelSensorScaleType] = {
    AirPressureScale.KILOPASCAL,
    PressureScale.KILOPASCAL,
    WaterPressureScale.KILOPASCAL,
}
UNIT_LIEDU: Set[MultilevelSensorScaleType] = {SeismicIntensityScale.LIEDU}
UNIT_LITER: Set[MultilevelSensorScaleType] = {TankCapacityScale.LITER}
UNIT_LITER_PER_HOUR: Set[MultilevelSensorScaleType] = {WaterFlowScale.LITER_PER_HOUR}
UNIT_LOCAL: Set[MultilevelSensorScaleType] = {SeismicMagnitudeScale.LOCAL}
UNIT_LUX: Set[MultilevelSensorScaleType] = {IlluminanceScale.LUX}
UNIT_MERCALLI: Set[MultilevelSensorScaleType] = {SeismicIntensityScale.MERCALLI}
UNIT_METER: Set[MultilevelSensorScaleType] = {DistanceScale.METER, TideLevelScale.METER}
UNIT_METER_PER_SQUARE_SECOND: Set[MultilevelSensorScaleType] = {
    AccelerationScale.METER_PER_SQUARE_SECOND
}
UNIT_MICROGRAM_PER_CUBIC_METER: Set[MultilevelSensorScaleType] = {
    ParticulateMatter10Scale.MICROGRAM_PER_CUBIC_METER,
    ParticulateMatter25Scale.MICROGRAM_PER_CUBIC_METER,
}
UNIT_MILLIAMPERE: Set[MultilevelSensorScaleType] = {CurrentScale.MILLIAMPERE}
UNIT_MILLIGRAM_PER_LITER: Set[MultilevelSensorScaleType] = {
    WaterChlorineLevelScale.MILLIGRAM_PER_LITER
}
UNIT_MILLIMETER_HOUR: Set[MultilevelSensorScaleType] = {RainRateScale.MILLIMETER_HOUR}
UNIT_MILLIVOLT: Set[MultilevelSensorScaleType] = {
    VoltageScale.MILLIVOLT,
    WaterOxidationReductionPotentialScale.MILLIVOLT,
}
UNIT_MOLE_PER_CUBIC_METER: Set[MultilevelSensorScaleType] = {
    CarbonMonoxideLevelScale.MOLE_PER_CUBIC_METER,
    FormaldehydeLevelScale.MOLE_PER_CUBIC_METER,
    MethaneDensityScale.MOLE_PER_CUBIC_METER,
    ParticulateMatter10Scale.MOLE_PER_CUBIC_METER,
    ParticulateMatter25Scale.MOLE_PER_CUBIC_METER,
    SoilSalinityScale.MOLE_PER_CUBIC_METER,
    VolatileOrganicCompoundLevelScale.MOLE_PER_CUBIC_METER,
}
UNIT_MOMENT: Set[MultilevelSensorScaleType] = {SeismicMagnitudeScale.MOMENT}
UNIT_MPH: Set[MultilevelSensorScaleType] = {VelocityScale.MPH}
UNIT_M_S: Set[MultilevelSensorScaleType] = {VelocityScale.M_S}
UNIT_NEWTON: Set[MultilevelSensorScaleType] = {AppliedForceOnTheSensorScale.NEWTON}
UNIT_OHM_METER: Set[MultilevelSensorScaleType] = {ElectricalResistivityScale.OHM_METER}
UNIT_PARTS_MILLION: Set[MultilevelSensorScaleType] = {
    CarbonDioxideLevelScale.PARTS_MILLION,
    CarbonMonoxideLevelScale.PARTS_MILLION,
    VolatileOrganicCompoundLevelScale.PARTS_MILLION,
}
UNIT_PERCENTAGE_VALUE: Set[MultilevelSensorScaleType] = {
    AnglePositionScale.PERCENTAGE_VALUE,
    GeneralPurposeScale.PERCENTAGE_VALUE,
    HumidityScale.PERCENTAGE_VALUE,
    IlluminanceScale.PERCENTAGE_VALUE,
    MoistureScale.PERCENTAGE_VALUE,
    PercentageScale.PERCENTAGE_VALUE,
}
UNIT_PICOCURIES_PER_LITER: Set[MultilevelSensorScaleType] = {
    RadonConcentrationScale.PICOCURIES_PER_LITER
}
UNIT_POUNDS: Set[MultilevelSensorScaleType] = {WeightScale.POUNDS}
UNIT_POUND_PER_SQUARE_INCH: Set[MultilevelSensorScaleType] = {
    PressureScale.POUND_PER_SQUARE_INCH
}
UNIT_POWER_LEVEL: Set[MultilevelSensorScaleType] = {RfSignalStrengthScale.POWER_LEVEL}
UNIT_REVOLUTIONS_PER_MINUTE: Set[MultilevelSensorScaleType] = {
    RotationScale.REVOLUTIONS_PER_MINUTE
}
UNIT_RSSI: Set[MultilevelSensorScaleType] = {RfSignalStrengthScale.RSSI}
UNIT_SECOND: Set[MultilevelSensorScaleType] = {TimeScale.SECOND}
UNIT_SHINDO: Set[MultilevelSensorScaleType] = {SeismicIntensityScale.SHINDO}
UNIT_SIEMENS_PER_METER: Set[MultilevelSensorScaleType] = {
    ElectricalConductivityScale.SIEMENS_PER_METER
}
UNIT_SURFACE_WAVE: Set[MultilevelSensorScaleType] = {SeismicMagnitudeScale.SURFACE_WAVE}
UNIT_SYSTOLIC: Set[MultilevelSensorScaleType] = {BloodPressureScale.SYSTOLIC}
UNIT_UNITLESS: Set[MultilevelSensorScaleType] = {UnitlessScale.UNITLESS}
UNIT_UV_INDEX: Set[MultilevelSensorScaleType] = {UltravioletScale.UV_INDEX}
UNIT_VOLT: Set[MultilevelSensorScaleType] = {VoltageScale.VOLT}
UNIT_VOLUME_WATER_CONTENT: Set[MultilevelSensorScaleType] = {
    MoistureScale.VOLUME_WATER_CONTENT
}
UNIT_WATER_ACTIVITY: Set[MultilevelSensorScaleType] = {MoistureScale.WATER_ACTIVITY}
UNIT_WATT: Set[MultilevelSensorScaleType] = {PowerScale.WATT}
UNIT_WATT_PER_SQUARE_METER: Set[MultilevelSensorScaleType] = {
    SolarRadiationScale.WATT_PER_SQUARE_METER
}

# ----------------------------------------------------------------------------------- #
# **END OF AUTOGENERATED CONTENT** (DO NOT EDIT/REMOVE THIS COMMENT BLOCK AND DO NOT  #
# EDIT ANYTHING ABOVE IT. IF A NEW IMPORT IS NEEDED, UPDATE THE LINES AROUND 135      #
# IN scripts/generate_multilevel_sensor_constants.py THEN RE-RUN THE SCRIPT. ALL      #
# LINES WRITTEN BELOW THIS BLOCK WILL BE PRESERVED AS LONG AS THIS BLOCK REMAINS)     #
# ----------------------------------------------------------------------------------- #

CO_SENSORS = {MultilevelSensorType.CARBON_MONOXIDE_LEVEL}
CO2_SENSORS = {MultilevelSensorType.CARBON_DIOXIDE_LEVEL}
CURRENT_SENSORS = {MultilevelSensorType.CURRENT}
ENERGY_MEASUREMENT_SENSORS = {MultilevelSensorType.BASIS_METABOLIC_RATE}
HUMIDITY_SENSORS = {MultilevelSensorType.HUMIDITY}
ILLUMINANCE_SENSORS = {MultilevelSensorType.ILLUMINANCE}
POWER_SENSORS = {MultilevelSensorType.POWER}
PRESSURE_SENSORS = {
    MultilevelSensorType.BLOOD_PRESSURE,
    MultilevelSensorType.WATER_PRESSURE,
    MultilevelSensorType.SUCTION_PRESSURE,
    MultilevelSensorType.DISCHARGE_PRESSURE,
    MultilevelSensorType.BAROMETRIC_PRESSURE,
    MultilevelSensorType.ATMOSPHERIC_PRESSURE,
}
SIGNAL_STRENGTH_SENSORS = {MultilevelSensorType.RF_SIGNAL_STRENGTH}
TEMPERATURE_SENSORS = {
    MultilevelSensorType.AIR_TEMPERATURE,
    MultilevelSensorType.DEW_POINT,
    MultilevelSensorType.WATER_TEMPERATURE,
    MultilevelSensorType.SOIL_TEMPERATURE,
    MultilevelSensorType.TARGET_TEMPERATURE,
    MultilevelSensorType.BOILER_WATER_TEMPERATURE,
    MultilevelSensorType.DOMESTIC_HOT_WATER_TEMPERATURE,
    MultilevelSensorType.OUTSIDE_TEMPERATURE,
    MultilevelSensorType.EXHAUST_TEMPERATURE,
    MultilevelSensorType.RETURN_AIR_TEMPERATURE,
    MultilevelSensorType.SUPPLY_AIR_TEMPERATURE,
    MultilevelSensorType.CONDENSER_COIL_TEMPERATURE,
    MultilevelSensorType.EVAPORATOR_COIL_TEMPERATURE,
    MultilevelSensorType.LIQUID_LINE_TEMPERATURE,
    MultilevelSensorType.DISCHARGE_LINE_TEMPERATURE,
    MultilevelSensorType.DEFROST_TEMPERATURE,
}
VOLTAGE_SENSORS = {
    MultilevelSensorType.VOLTAGE,
    MultilevelSensorType.WATER_OXIDATION_REDUCTION_POTENTIAL,
}
