Drop unused dtype (#86459)

This commit is contained in:
Marc Mueller 2023-01-23 16:24:02 +01:00 committed by GitHub
parent 8672be3829
commit 7c8f6e9fad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ from __future__ import annotations
from collections.abc import Mapping from collections.abc import Mapping
from dataclasses import dataclass from dataclasses import dataclass
from typing import TypeAlias
from homeassistant.components.sensor import ( from homeassistant.components.sensor import (
SensorDeviceClass, SensorDeviceClass,
@ -38,15 +37,12 @@ from .const import (
) )
from .coordinator import ZamgDataUpdateCoordinator from .coordinator import ZamgDataUpdateCoordinator
_DType: TypeAlias = "type[int] | type[float] | type[str]"
@dataclass @dataclass
class ZamgRequiredKeysMixin: class ZamgRequiredKeysMixin:
"""Mixin for required keys.""" """Mixin for required keys."""
para_name: str para_name: str
dtype: _DType
@dataclass @dataclass
@ -62,7 +58,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.PRESSURE, device_class=SensorDeviceClass.PRESSURE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="P", para_name="P",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="pressure_sealevel", key="pressure_sealevel",
@ -71,7 +66,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.PRESSURE, device_class=SensorDeviceClass.PRESSURE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="PRED", para_name="PRED",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="humidity", key="humidity",
@ -80,7 +74,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.HUMIDITY, device_class=SensorDeviceClass.HUMIDITY,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="RFAM", para_name="RFAM",
dtype=int,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="wind_speed", key="wind_speed",
@ -89,7 +82,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.WIND_SPEED, device_class=SensorDeviceClass.WIND_SPEED,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="FFAM", para_name="FFAM",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="wind_bearing", key="wind_bearing",
@ -97,7 +89,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
native_unit_of_measurement=DEGREE, native_unit_of_measurement=DEGREE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="DD", para_name="DD",
dtype=int,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="wind_max_speed", key="wind_max_speed",
@ -106,7 +97,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.WIND_SPEED, device_class=SensorDeviceClass.WIND_SPEED,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="FFX", para_name="FFX",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="wind_max_bearing", key="wind_max_bearing",
@ -114,7 +104,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
native_unit_of_measurement=DEGREE, native_unit_of_measurement=DEGREE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="DDX", para_name="DDX",
dtype=int,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="sun_last_10min", key="sun_last_10min",
@ -122,7 +111,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
native_unit_of_measurement=UnitOfTime.SECONDS, native_unit_of_measurement=UnitOfTime.SECONDS,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="SO", para_name="SO",
dtype=int,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="temperature", key="temperature",
@ -131,7 +119,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="TL", para_name="TL",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="temperature_average", key="temperature_average",
@ -140,7 +127,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="TLAM", para_name="TLAM",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="precipitation", key="precipitation",
@ -149,7 +135,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.PRECIPITATION, device_class=SensorDeviceClass.PRECIPITATION,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="RR", para_name="RR",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="snow", key="snow",
@ -158,7 +143,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.PRECIPITATION, device_class=SensorDeviceClass.PRECIPITATION,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="SCHNEE", para_name="SCHNEE",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="dewpoint", key="dewpoint",
@ -167,7 +151,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="TP", para_name="TP",
dtype=float,
), ),
ZamgSensorEntityDescription( ZamgSensorEntityDescription(
key="dewpoint_average", key="dewpoint_average",
@ -176,7 +159,6 @@ SENSOR_TYPES: tuple[ZamgSensorEntityDescription, ...] = (
device_class=SensorDeviceClass.TEMPERATURE, device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
para_name="TPAM", para_name="TPAM",
dtype=float,
), ),
) )