From ea2bc3fde161e7925ee4aea5a007c28861b052f8 Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Thu, 21 Oct 2021 02:31:32 -0400 Subject: [PATCH] Add entity categories to goalzero (#57906) --- homeassistant/components/goalzero/binary_sensor.py | 3 ++- homeassistant/components/goalzero/sensor.py | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/goalzero/binary_sensor.py b/homeassistant/components/goalzero/binary_sensor.py index ddde8c80e96..56bbe1e2261 100644 --- a/homeassistant/components/goalzero/binary_sensor.py +++ b/homeassistant/components/goalzero/binary_sensor.py @@ -11,7 +11,7 @@ from homeassistant.components.binary_sensor import ( BinarySensorEntityDescription, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_NAME +from homeassistant.const import CONF_NAME, ENTITY_CATEGORY_DIAGNOSTIC from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.update_coordinator import DataUpdateCoordinator @@ -31,6 +31,7 @@ BINARY_SENSOR_TYPES: tuple[BinarySensorEntityDescription, ...] = ( key="app_online", name="App Online", device_class=DEVICE_CLASS_CONNECTIVITY, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), BinarySensorEntityDescription( key="isCharging", diff --git a/homeassistant/components/goalzero/sensor.py b/homeassistant/components/goalzero/sensor.py index bd775ab82bb..6677936b35a 100644 --- a/homeassistant/components/goalzero/sensor.py +++ b/homeassistant/components/goalzero/sensor.py @@ -22,6 +22,7 @@ from homeassistant.const import ( ELECTRIC_CURRENT_AMPERE, ELECTRIC_POTENTIAL_VOLT, ENERGY_WATT_HOUR, + ENTITY_CATEGORY_DIAGNOSTIC, PERCENTAGE, POWER_WATT, SIGNAL_STRENGTH_DECIBELS, @@ -107,6 +108,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( name="Temperature", device_class=DEVICE_CLASS_TEMPERATURE, native_unit_of_measurement=TEMP_CELSIUS, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), SensorEntityDescription( key="wifiStrength", @@ -114,22 +116,26 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( device_class=DEVICE_CLASS_SIGNAL_STRENGTH, native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS, entity_registry_enabled_default=False, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), SensorEntityDescription( key="timestamp", name="Total Run Time", native_unit_of_measurement=TIME_SECONDS, entity_registry_enabled_default=False, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), SensorEntityDescription( key="ssid", name="Wi-Fi SSID", entity_registry_enabled_default=False, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), SensorEntityDescription( key="ipAddr", name="IP Address", entity_registry_enabled_default=False, + entity_category=ENTITY_CATEGORY_DIAGNOSTIC, ), )