Use new enums in netatmo (#61941)
parent
6f54636baf
commit
4bfc3eb22f
|
@ -19,7 +19,6 @@ from homeassistant.const import (
|
|||
ATTR_LONGITUDE,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
DEGREE,
|
||||
ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
LENGTH_MILLIMETERS,
|
||||
PERCENTAGE,
|
||||
PRESSURE_MBAR,
|
||||
|
@ -35,6 +34,7 @@ from homeassistant.helpers.dispatcher import (
|
|||
async_dispatcher_connect,
|
||||
async_dispatcher_send,
|
||||
)
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import (
|
||||
|
@ -174,7 +174,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||
name="Battery Percent",
|
||||
netatmo_name="battery_percent",
|
||||
entity_registry_enabled_default=True,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.BATTERY,
|
||||
|
@ -234,7 +234,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||
name="Reachability",
|
||||
netatmo_name="reachable",
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
icon="mdi:signal",
|
||||
),
|
||||
NetatmoSensorEntityDescription(
|
||||
|
@ -242,7 +242,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||
name="Radio",
|
||||
netatmo_name="rf_status",
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
icon="mdi:signal",
|
||||
),
|
||||
NetatmoSensorEntityDescription(
|
||||
|
@ -250,7 +250,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||
name="Radio Level",
|
||||
netatmo_name="rf_status",
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||
|
@ -260,7 +260,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||
name="Wifi",
|
||||
netatmo_name="wifi_status",
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
icon="mdi:wifi",
|
||||
),
|
||||
NetatmoSensorEntityDescription(
|
||||
|
@ -268,7 +268,7 @@ SENSOR_TYPES: tuple[NetatmoSensorEntityDescription, ...] = (
|
|||
name="Wifi Level",
|
||||
netatmo_name="wifi_status",
|
||||
entity_registry_enabled_default=False,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
|
||||
|
@ -589,7 +589,7 @@ class NetatmoClimateBatterySensor(NetatmoBase, SensorEntity):
|
|||
name="Battery Percent",
|
||||
netatmo_name="battery_percent",
|
||||
entity_registry_enabled_default=True,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
device_class=SensorDeviceClass.BATTERY,
|
||||
|
|
Loading…
Reference in New Issue