From accebd7f38e54764e25fcb927bba36aa671b094d Mon Sep 17 00:00:00 2001 From: mhuiskes <92112296+mhuiskes@users.noreply.github.com> Date: Fri, 29 May 2026 12:51:17 +0200 Subject: [PATCH] Remove diagnostic category and dead translation key from pac sensor (#172548) --- homeassistant/components/zeversolar/sensor.py | 4 +--- tests/components/zeversolar/snapshots/test_sensor.ambr | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/zeversolar/sensor.py b/homeassistant/components/zeversolar/sensor.py index a900a191ad1d..0d32283d4a79 100644 --- a/homeassistant/components/zeversolar/sensor.py +++ b/homeassistant/components/zeversolar/sensor.py @@ -11,7 +11,7 @@ from homeassistant.components.sensor import ( SensorEntityDescription, SensorStateClass, ) -from homeassistant.const import EntityCategory, UnitOfEnergy, UnitOfPower +from homeassistant.const import UnitOfEnergy, UnitOfPower from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -29,10 +29,8 @@ class ZeversolarEntityDescription(SensorEntityDescription): SENSOR_TYPES = ( ZeversolarEntityDescription( key="pac", - translation_key="pac", native_unit_of_measurement=UnitOfPower.WATT, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, device_class=SensorDeviceClass.POWER, value_fn=lambda data: data.pac, ), diff --git a/tests/components/zeversolar/snapshots/test_sensor.ambr b/tests/components/zeversolar/snapshots/test_sensor.ambr index 49b25056a06e..c6eb81c87175 100644 --- a/tests/components/zeversolar/snapshots/test_sensor.ambr +++ b/tests/components/zeversolar/snapshots/test_sensor.ambr @@ -72,7 +72,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.zeversolar_sensor_power', 'has_entity_name': True, 'hidden_by': None, @@ -94,7 +94,7 @@ 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'pac', + 'translation_key': None, 'unique_id': '123456778_pac', 'unit_of_measurement': , })