from .const import ENTITY_DESC_KEY_BATTERY as ENTITY_DESC_KEY_BATTERY, ENTITY_DESC_KEY_CO as ENTITY_DESC_KEY_CO, ENTITY_DESC_KEY_CO2 as ENTITY_DESC_KEY_CO2, ENTITY_DESC_KEY_CURRENT as ENTITY_DESC_KEY_CURRENT, ENTITY_DESC_KEY_ENERGY_MEASUREMENT as ENTITY_DESC_KEY_ENERGY_MEASUREMENT, ENTITY_DESC_KEY_ENERGY_TOTAL_INCREASING as ENTITY_DESC_KEY_ENERGY_TOTAL_INCREASING, ENTITY_DESC_KEY_HUMIDITY as ENTITY_DESC_KEY_HUMIDITY, ENTITY_DESC_KEY_ILLUMINANCE as ENTITY_DESC_KEY_ILLUMINANCE, ENTITY_DESC_KEY_MEASUREMENT as ENTITY_DESC_KEY_MEASUREMENT, ENTITY_DESC_KEY_POWER as ENTITY_DESC_KEY_POWER, ENTITY_DESC_KEY_POWER_FACTOR as ENTITY_DESC_KEY_POWER_FACTOR, ENTITY_DESC_KEY_PRESSURE as ENTITY_DESC_KEY_PRESSURE, ENTITY_DESC_KEY_SIGNAL_STRENGTH as ENTITY_DESC_KEY_SIGNAL_STRENGTH, ENTITY_DESC_KEY_TARGET_TEMPERATURE as ENTITY_DESC_KEY_TARGET_TEMPERATURE, ENTITY_DESC_KEY_TEMPERATURE as ENTITY_DESC_KEY_TEMPERATURE, ENTITY_DESC_KEY_TOTAL_INCREASING as ENTITY_DESC_KEY_TOTAL_INCREASING, ENTITY_DESC_KEY_VOLTAGE as ENTITY_DESC_KEY_VOLTAGE
from .helpers import ZwaveValueID as ZwaveValueID
from _typeshed import Incomplete
from collections.abc import Iterable, Mapping
from homeassistant.const import CONCENTRATION_MICROGRAMS_PER_CUBIC_METER as CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_PARTS_PER_MILLION as CONCENTRATION_PARTS_PER_MILLION, DEGREE as DEGREE, LIGHT_LUX as LIGHT_LUX, PERCENTAGE as PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT as SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UV_INDEX as UV_INDEX, UnitOfElectricCurrent as UnitOfElectricCurrent, UnitOfElectricPotential as UnitOfElectricPotential, UnitOfEnergy as UnitOfEnergy, UnitOfFrequency as UnitOfFrequency, UnitOfIrradiance as UnitOfIrradiance, UnitOfLength as UnitOfLength, UnitOfMass as UnitOfMass, UnitOfPower as UnitOfPower, UnitOfPressure as UnitOfPressure, UnitOfSoundPressure as UnitOfSoundPressure, UnitOfSpeed as UnitOfSpeed, UnitOfTemperature as UnitOfTemperature, UnitOfTime as UnitOfTime, UnitOfVolume as UnitOfVolume, UnitOfVolumeFlowRate as UnitOfVolumeFlowRate, UnitOfVolumetricFlux as UnitOfVolumetricFlux
from typing import Any
from zwave_js_server.const.command_class.meter import MeterScaleType as MeterScaleType
from zwave_js_server.const.command_class.multilevel_sensor import MultilevelSensorScaleType as MultilevelSensorScaleType, MultilevelSensorType
from zwave_js_server.model.node import Node as ZwaveNode
from zwave_js_server.model.value import ConfigurationValue as ZwaveConfigurationValue, Value as ZwaveValue

METER_DEVICE_CLASS_MAP: dict[str, list[MeterScaleType]]
MULTILEVEL_SENSOR_DEVICE_CLASS_MAP: dict[str, list[MultilevelSensorType]]
METER_UNIT_MAP: dict[str, list[MeterScaleType]]
MULTILEVEL_SENSOR_UNIT_MAP: dict[str, list[MultilevelSensorScaleType]]
_LOGGER: Incomplete

class BaseDiscoverySchemaDataTemplate:
    static_data: Union[Any, None]
    def resolve_data(self, value: ZwaveValue) -> Any: ...
    def values_to_watch(self, resolved_data: Any) -> Iterable[Union[ZwaveValue, None]]: ...
    def value_ids_to_watch(self, resolved_data: Any) -> set[str]: ...
    @staticmethod
    def _get_value_from_id(node: ZwaveNode, value_id_obj: ZwaveValueID) -> Union[ZwaveValue, ZwaveConfigurationValue, None]: ...
    def __init__(self, static_data) -> None: ...

class DynamicCurrentTempClimateDataTemplate(BaseDiscoverySchemaDataTemplate):
    lookup_table: dict[Union[str, int], ZwaveValueID]
    dependent_value: Union[ZwaveValueID, None]
    def resolve_data(self, value: ZwaveValue) -> dict[str, Any]: ...
    def values_to_watch(self, resolved_data: dict[str, Any]) -> Iterable[Union[ZwaveValue, None]]: ...
    @staticmethod
    def current_temperature_value(resolved_data: dict[str, Any]) -> Union[ZwaveValue, None]: ...
    def __init__(self, static_data, lookup_table, dependent_value) -> None: ...

class NumericSensorDataTemplateData:
    entity_description_key: Union[str, None]
    unit_of_measurement: Union[str, None]
    def __init__(self, entity_description_key, unit_of_measurement) -> None: ...

class NumericSensorDataTemplate(BaseDiscoverySchemaDataTemplate):
    @staticmethod
    def find_key_from_matching_set(enum_value: Union[MultilevelSensorType, MultilevelSensorScaleType, MeterScaleType], set_map: Mapping[str, Union[list[MultilevelSensorType], list[MultilevelSensorScaleType], list[MeterScaleType]]]) -> Union[str, None]: ...
    def resolve_data(self, value: ZwaveValue) -> NumericSensorDataTemplateData: ...

class TiltValueMix:
    tilt_value_id: ZwaveValueID
    def __init__(self, tilt_value_id) -> None: ...

class CoverTiltDataTemplate(BaseDiscoverySchemaDataTemplate, TiltValueMix):
    def resolve_data(self, value: ZwaveValue) -> dict[str, Union[ZwaveValue, None]]: ...
    def values_to_watch(self, resolved_data: dict[str, Any]) -> Iterable[Union[ZwaveValue, None]]: ...
    @staticmethod
    def current_tilt_value(resolved_data: dict[str, Union[ZwaveValue, None]]) -> Union[ZwaveValue, None]: ...
    def __init__(self, tilt_value_id, static_data) -> None: ...

class FanValueMapping:
    presets: dict[int, str]
    speeds: list[tuple[int, int]]
    def __post_init__(self) -> None: ...
    def __init__(self, presets, speeds) -> None: ...

class FanValueMappingDataTemplate:
    def get_fan_value_mapping(self, resolved_data: dict[str, Any]) -> Union[FanValueMapping, None]: ...

class ConfigurableFanValueMappingValueMix:
    configuration_option: ZwaveValueID
    configuration_value_to_fan_value_mapping: dict[int, FanValueMapping]
    def __init__(self, configuration_option, configuration_value_to_fan_value_mapping) -> None: ...

class ConfigurableFanValueMappingDataTemplate(BaseDiscoverySchemaDataTemplate, FanValueMappingDataTemplate, ConfigurableFanValueMappingValueMix):
    def resolve_data(self, value: ZwaveValue) -> dict[str, Union[ZwaveConfigurationValue, None]]: ...
    def values_to_watch(self, resolved_data: dict[str, Union[ZwaveConfigurationValue, None]]) -> Iterable[Union[ZwaveConfigurationValue, None]]: ...
    def get_fan_value_mapping(self, resolved_data: dict[str, Union[ZwaveConfigurationValue, None]]) -> Union[FanValueMapping, None]: ...
    def __init__(self, configuration_option, configuration_value_to_fan_value_mapping, static_data) -> None: ...

class FixedFanValueMappingValueMix:
    fan_value_mapping: FanValueMapping
    def __init__(self, fan_value_mapping) -> None: ...

class FixedFanValueMappingDataTemplate(BaseDiscoverySchemaDataTemplate, FanValueMappingDataTemplate, FixedFanValueMappingValueMix):
    def get_fan_value_mapping(self, resolved_data: dict[str, ZwaveConfigurationValue]) -> FanValueMapping: ...
    def __init__(self, fan_value_mapping, static_data) -> None: ...
