<commit_before>"""Meteo-France component constants."""

from homeassistant.components.weather import (
    ATTR_CONDITION_CLEAR_NIGHT,
    ATTR_CONDITION_CLOUDY,
    ATTR_CONDITION_EXCEPTIONAL,
    ATTR_CONDITION_FOG,
    ATTR_CONDITION_HAIL,
    ATTR_CONDITION_LIGHTNING,
    ATTR_CONDITION_LIGHTNING_RAINY,
    ATTR_CONDITION_PARTLYCLOUDY,
    ATTR_CONDITION_POURING,
    ATTR_CONDITION_RAINY,
    ATTR_CONDITION_SNOWY,
    ATTR_CONDITION_SNOWY_RAINY,
    ATTR_CONDITION_SUNNY,
    ATTR_CONDITION_WINDY,
    ATTR_CONDITION_WINDY_VARIANT,
)
from homeassistant.const import (
    DEVICE_CLASS_PRESSURE,
    DEVICE_CLASS_TEMPERATURE,
    DEVICE_CLASS_TIMESTAMP,
    LENGTH_MILLIMETERS,
    PERCENTAGE,
    PRESSURE_HPA,
    SPEED_KILOMETERS_PER_HOUR,
    TEMP_CELSIUS,
)

DOMAIN = "meteo_france"
PLATFORMS = ["sensor", "weather"]
COORDINATOR_FORECAST = "coordinator_forecast"
COORDINATOR_RAIN = "coordinator_rain"
COORDINATOR_ALERT = "coordinator_alert"
UNDO_UPDATE_LISTENER = "undo_update_listener"
ATTRIBUTION = "Data provided by Météo-France"

CONF_CITY = "city"
FORECAST_MODE_HOURLY = "hourly"
FORECAST_MODE_DAILY = "daily"
FORECAST_MODE = [FORECAST_MODE_HOURLY, FORECAST_MODE_DAILY]

ATTR_NEXT_RAIN_1_HOUR_FORECAST = "1_hour_forecast"
ATTR_NEXT_RAIN_DT_REF = "forecast_time_ref"

ENTITY_NAME = "name"
ENTITY_UNIT = "unit"
ENTITY_ICON = "icon"
ENTITY_DEVICE_CLASS = "device_class"
ENTITY_ENABLE = "enable"
ENTITY_API_DATA_PATH = "data_path"

SENSOR_TYPES = {
    "pressure": {
        ENTITY_NAME: "Pressure",
        ENTITY_UNIT: PRESSURE_HPA,
        ENTITY_ICON: None,
        ENTITY_DEVICE_CLASS: DEVICE_CLASS_PRESSURE,
        ENTITY_ENABLE: False,
        ENTITY_API_DATA_PATH: "current_forecast:sea_level",
    },
    "rain_chance": {
        ENTITY_NAME: "Rain chance",
        ENTITY_UNIT: PERCENTAGE,
        ENTITY_ICON: "mdi:weather-rainy",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: True,
        ENTITY_API_DATA_PATH: "probability_forecast:rain:3h",
    },
    "snow_chance": {
        ENTITY_NAME: "Snow chance",
        ENTITY_UNIT: PERCENTAGE,
        ENTITY_ICON: "mdi:weather-snowy",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: True,
        ENTITY_API_DATA_PATH: "probability_forecast:snow:3h",
    },
    "freeze_chance": {
        ENTITY_NAME: "Freeze chance",
        ENTITY_UNIT: PERCENTAGE,
        ENTITY_ICON: "mdi:snowflake",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: True,
        ENTITY_API_DATA_PATH: "probability_forecast:freezing",
    },
    "wind_speed": {
        ENTITY_NAME: "Wind speed",
        ENTITY_UNIT: SPEED_KILOMETERS_PER_HOUR,
        ENTITY_ICON: "mdi:weather-windy",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: False,
        ENTITY_API_DATA_PATH: "current_forecast:wind:speed",
    },
    "next_rain": {
        ENTITY_NAME: "Next rain",
        ENTITY_UNIT: None,
        ENTITY_ICON: None,
        ENTITY_DEVICE_CLASS: DEVICE_CLASS_TIMESTAMP,
        ENTITY_ENABLE: True,
        ENTITY_API_DATA_PATH: None,
    },
    "temperature": {
        ENTITY_NAME: "Temperature",
        ENTITY_UNIT: TEMP_CELSIUS,
        ENTITY_ICON: None,
        ENTITY_DEVICE_CLASS: DEVICE_CLASS_TEMPERATURE,
        ENTITY_ENABLE: False,
        ENTITY_API_DATA_PATH: "current_forecast:T:value",
    },
    "uv": {
        ENTITY_NAME: "UV",
        ENTITY_UNIT: None,
        ENTITY_ICON: "mdi:sunglasses",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: True,<commit_msg>Add UV unit to meteo_france UV sensor (#43992)<commit_after>"""Meteo-France component constants."""

from homeassistant.components.weather import (
    ATTR_CONDITION_CLEAR_NIGHT,
    ATTR_CONDITION_CLOUDY,
    ATTR_CONDITION_EXCEPTIONAL,
    ATTR_CONDITION_FOG,
    ATTR_CONDITION_HAIL,
    ATTR_CONDITION_LIGHTNING,
    ATTR_CONDITION_LIGHTNING_RAINY,
    ATTR_CONDITION_PARTLYCLOUDY,
    ATTR_CONDITION_POURING,
    ATTR_CONDITION_RAINY,
    ATTR_CONDITION_SNOWY,
    ATTR_CONDITION_SNOWY_RAINY,
    ATTR_CONDITION_SUNNY,
    ATTR_CONDITION_WINDY,
    ATTR_CONDITION_WINDY_VARIANT,
)
from homeassistant.const import (
    DEVICE_CLASS_PRESSURE,
    DEVICE_CLASS_TEMPERATURE,
    DEVICE_CLASS_TIMESTAMP,
    LENGTH_MILLIMETERS,
    PERCENTAGE,
    PRESSURE_HPA,
    SPEED_KILOMETERS_PER_HOUR,
    TEMP_CELSIUS,
    UV_INDEX,
)

DOMAIN = "meteo_france"
PLATFORMS = ["sensor", "weather"]
COORDINATOR_FORECAST = "coordinator_forecast"
COORDINATOR_RAIN = "coordinator_rain"
COORDINATOR_ALERT = "coordinator_alert"
UNDO_UPDATE_LISTENER = "undo_update_listener"
ATTRIBUTION = "Data provided by Météo-France"

CONF_CITY = "city"
FORECAST_MODE_HOURLY = "hourly"
FORECAST_MODE_DAILY = "daily"
FORECAST_MODE = [FORECAST_MODE_HOURLY, FORECAST_MODE_DAILY]

ATTR_NEXT_RAIN_1_HOUR_FORECAST = "1_hour_forecast"
ATTR_NEXT_RAIN_DT_REF = "forecast_time_ref"

ENTITY_NAME = "name"
ENTITY_UNIT = "unit"
ENTITY_ICON = "icon"
ENTITY_DEVICE_CLASS = "device_class"
ENTITY_ENABLE = "enable"
ENTITY_API_DATA_PATH = "data_path"

SENSOR_TYPES = {
    "pressure": {
        ENTITY_NAME: "Pressure",
        ENTITY_UNIT: PRESSURE_HPA,
        ENTITY_ICON: None,
        ENTITY_DEVICE_CLASS: DEVICE_CLASS_PRESSURE,
        ENTITY_ENABLE: False,
        ENTITY_API_DATA_PATH: "current_forecast:sea_level",
    },
    "rain_chance": {
        ENTITY_NAME: "Rain chance",
        ENTITY_UNIT: PERCENTAGE,
        ENTITY_ICON: "mdi:weather-rainy",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: True,
        ENTITY_API_DATA_PATH: "probability_forecast:rain:3h",
    },
    "snow_chance": {
        ENTITY_NAME: "Snow chance",
        ENTITY_UNIT: PERCENTAGE,
        ENTITY_ICON: "mdi:weather-snowy",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: True,
        ENTITY_API_DATA_PATH: "probability_forecast:snow:3h",
    },
    "freeze_chance": {
        ENTITY_NAME: "Freeze chance",
        ENTITY_UNIT: PERCENTAGE,
        ENTITY_ICON: "mdi:snowflake",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: True,
        ENTITY_API_DATA_PATH: "probability_forecast:freezing",
    },
    "wind_speed": {
        ENTITY_NAME: "Wind speed",
        ENTITY_UNIT: SPEED_KILOMETERS_PER_HOUR,
        ENTITY_ICON: "mdi:weather-windy",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: False,
        ENTITY_API_DATA_PATH: "current_forecast:wind:speed",
    },
    "next_rain": {
        ENTITY_NAME: "Next rain",
        ENTITY_UNIT: None,
        ENTITY_ICON: None,
        ENTITY_DEVICE_CLASS: DEVICE_CLASS_TIMESTAMP,
        ENTITY_ENABLE: True,
        ENTITY_API_DATA_PATH: None,
    },
    "temperature": {
        ENTITY_NAME: "Temperature",
        ENTITY_UNIT: TEMP_CELSIUS,
        ENTITY_ICON: None,
        ENTITY_DEVICE_CLASS: DEVICE_CLASS_TEMPERATURE,
        ENTITY_ENABLE: False,
        ENTITY_API_DATA_PATH: "current_forecast:T:value",
    },
    "uv": {
        ENTITY_NAME: "UV",
        ENTITY_UNIT: UV_INDEX,
        ENTITY_ICON: "mdi:sunglasses",
        ENTITY_DEVICE_CLASS: None,
        ENTITY_ENABLE: True,
{'fraction_non_alphanumeric': 0.08703096019403624, 'fraction_numerical': 0.0018547581680696248, 'mean_word_length': 3.543097861309138, 'pattern_counts': {'":': 16, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3740252', 'n_tokens_mistral': 2818, 'n_tokens_neox': 2624, 'n_words': 373}