From aeab8a0143b1688a0a01db485f590d1d81aff6b9 Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 3 Dec 2024 12:34:03 +0100 Subject: [PATCH] Plugwise fixes from quality review (#132158) --- homeassistant/components/plugwise/binary_sensor.py | 2 -- homeassistant/components/plugwise/climate.py | 2 -- homeassistant/components/plugwise/quality_scale.yaml | 8 ++------ homeassistant/components/plugwise/strings.json | 3 --- homeassistant/components/plugwise/switch.py | 1 - 5 files changed, 2 insertions(+), 14 deletions(-) diff --git a/homeassistant/components/plugwise/binary_sensor.py b/homeassistant/components/plugwise/binary_sensor.py index fb271ea7264..f422d4facf3 100644 --- a/homeassistant/components/plugwise/binary_sensor.py +++ b/homeassistant/components/plugwise/binary_sensor.py @@ -34,7 +34,6 @@ class PlugwiseBinarySensorEntityDescription(BinarySensorEntityDescription): BINARY_SENSORS: tuple[PlugwiseBinarySensorEntityDescription, ...] = ( PlugwiseBinarySensorEntityDescription( key="low_battery", - translation_key="low_battery", device_class=BinarySensorDeviceClass.BATTERY, entity_category=EntityCategory.DIAGNOSTIC, ), @@ -56,7 +55,6 @@ BINARY_SENSORS: tuple[PlugwiseBinarySensorEntityDescription, ...] = ( PlugwiseBinarySensorEntityDescription( key="flame_state", translation_key="flame_state", - name="Flame state", entity_category=EntityCategory.DIAGNOSTIC, ), PlugwiseBinarySensorEntityDescription( diff --git a/homeassistant/components/plugwise/climate.py b/homeassistant/components/plugwise/climate.py index 242b0944782..06b8171a528 100644 --- a/homeassistant/components/plugwise/climate.py +++ b/homeassistant/components/plugwise/climate.py @@ -60,7 +60,6 @@ async def async_setup_entry( class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity): """Representation of a Plugwise thermostat.""" - _attr_has_entity_name = True _attr_name = None _attr_temperature_unit = UnitOfTemperature.CELSIUS _attr_translation_key = DOMAIN @@ -75,7 +74,6 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity): ) -> None: """Set up the Plugwise API.""" super().__init__(coordinator, device_id) - self._attr_extra_state_attributes = {} self._attr_unique_id = f"{device_id}-climate" self._devices = coordinator.data.devices diff --git a/homeassistant/components/plugwise/quality_scale.yaml b/homeassistant/components/plugwise/quality_scale.yaml index b61071a285d..0881e79c1c0 100644 --- a/homeassistant/components/plugwise/quality_scale.yaml +++ b/homeassistant/components/plugwise/quality_scale.yaml @@ -16,9 +16,7 @@ rules: status: todo comment: Clean up coordinator (L71) check for mypy happiness entity-unique-id: done - has-entity-name: - status: todo - comment: Clean up climate (already in superclass) + has-entity-name: done entity-event-setup: done dependency-transparency: done action-setup: @@ -62,9 +60,7 @@ rules: status: exempt comment: Plugwise has no options flow ## Gold - entity-translations: - status: todo - comment: Clean up name where not needed, remove translation key on deviceclasses + entity-translations: done entity-device-class: done devices: done entity-category: done diff --git a/homeassistant/components/plugwise/strings.json b/homeassistant/components/plugwise/strings.json index c09323f458b..f74fc036e2a 100644 --- a/homeassistant/components/plugwise/strings.json +++ b/homeassistant/components/plugwise/strings.json @@ -30,9 +30,6 @@ }, "entity": { "binary_sensor": { - "low_battery": { - "name": "Battery state" - }, "compressor_state": { "name": "Compressor state" }, diff --git a/homeassistant/components/plugwise/switch.py b/homeassistant/components/plugwise/switch.py index 744fc0a2b72..305518f4bef 100644 --- a/homeassistant/components/plugwise/switch.py +++ b/homeassistant/components/plugwise/switch.py @@ -48,7 +48,6 @@ SWITCHES: tuple[PlugwiseSwitchEntityDescription, ...] = ( PlugwiseSwitchEntityDescription( key="cooling_ena_switch", translation_key="cooling_ena_switch", - name="Cooling", entity_category=EntityCategory.CONFIG, ), )