Migrate Goalzero to new entity naming style (#75358)

This commit is contained in:
Robert Hillis 2022-07-18 06:12:13 -04:00 committed by GitHub
parent ca5065a627
commit 6fdb414b58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 21 deletions

View file

@ -32,14 +32,14 @@ from .entity import GoalZeroEntity
SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key="wattsIn",
name="Watts In",
name="Watts in",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=POWER_WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="ampsIn",
name="Amps In",
name="Amps in",
device_class=SensorDeviceClass.CURRENT,
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
state_class=SensorStateClass.MEASUREMENT,
@ -47,14 +47,14 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="wattsOut",
name="Watts Out",
name="Watts out",
device_class=SensorDeviceClass.POWER,
native_unit_of_measurement=POWER_WATT,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="ampsOut",
name="Amps Out",
name="Amps out",
device_class=SensorDeviceClass.CURRENT,
native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE,
state_class=SensorStateClass.MEASUREMENT,
@ -62,7 +62,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="whOut",
name="WH Out",
name="Wh out",
device_class=SensorDeviceClass.ENERGY,
native_unit_of_measurement=ENERGY_WATT_HOUR,
state_class=SensorStateClass.TOTAL_INCREASING,
@ -70,7 +70,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="whStored",
name="WH Stored",
name="Wh stored",
device_class=SensorDeviceClass.ENERGY,
native_unit_of_measurement=ENERGY_WATT_HOUR,
state_class=SensorStateClass.MEASUREMENT,
@ -84,13 +84,13 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="socPercent",
name="State of Charge Percent",
name="State of charge percent",
device_class=SensorDeviceClass.BATTERY,
native_unit_of_measurement=PERCENTAGE,
),
SensorEntityDescription(
key="timeToEmptyFull",
name="Time to Empty/Full",
name="Time to empty/full",
device_class=TIME_MINUTES,
native_unit_of_measurement=TIME_MINUTES,
),
@ -103,7 +103,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="wifiStrength",
name="Wifi Strength",
name="Wi-Fi strength",
device_class=SensorDeviceClass.SIGNAL_STRENGTH,
native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS,
entity_registry_enabled_default=False,
@ -111,7 +111,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="timestamp",
name="Total Run Time",
name="Total run time",
native_unit_of_measurement=TIME_SECONDS,
entity_registry_enabled_default=False,
entity_category=EntityCategory.DIAGNOSTIC,
@ -124,7 +124,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="ipAddr",
name="IP Address",
name="IP address",
entity_registry_enabled_default=False,
entity_category=EntityCategory.DIAGNOSTIC,
),