From 914fc570c6c4a3cf8f2f7e9bb16c396d7fe6c720 Mon Sep 17 00:00:00 2001 From: Patrick ZAJDA Date: Fri, 7 Jul 2023 19:38:43 +0200 Subject: [PATCH] Set some Switchbot entity names to none (#90846) --- homeassistant/components/switchbot/binary_sensor.py | 6 +++--- homeassistant/components/switchbot/sensor.py | 2 +- homeassistant/components/switchbot/strings.json | 9 --------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/homeassistant/components/switchbot/binary_sensor.py b/homeassistant/components/switchbot/binary_sensor.py index cb11c64f16a..237a2d97668 100644 --- a/homeassistant/components/switchbot/binary_sensor.py +++ b/homeassistant/components/switchbot/binary_sensor.py @@ -25,12 +25,12 @@ BINARY_SENSOR_TYPES: dict[str, BinarySensorEntityDescription] = { ), "motion_detected": BinarySensorEntityDescription( key="pir_state", - translation_key="motion", + name=None, device_class=BinarySensorDeviceClass.MOTION, ), "contact_open": BinarySensorEntityDescription( key="contact_open", - translation_key="door_open", + name=None, device_class=BinarySensorDeviceClass.DOOR, ), "contact_timeout": BinarySensorEntityDescription( @@ -46,7 +46,7 @@ BINARY_SENSOR_TYPES: dict[str, BinarySensorEntityDescription] = { ), "door_open": BinarySensorEntityDescription( key="door_status", - translation_key="door_open", + name=None, device_class=BinarySensorDeviceClass.DOOR, ), "unclosed_alarm": BinarySensorEntityDescription( diff --git a/homeassistant/components/switchbot/sensor.py b/homeassistant/components/switchbot/sensor.py index b5b34bf54ec..e9e434bc51c 100644 --- a/homeassistant/components/switchbot/sensor.py +++ b/homeassistant/components/switchbot/sensor.py @@ -67,7 +67,7 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = { ), "temperature": SensorEntityDescription( key="temperature", - translation_key="temperature", + name=None, native_unit_of_measurement=UnitOfTemperature.CELSIUS, state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.TEMPERATURE, diff --git a/homeassistant/components/switchbot/strings.json b/homeassistant/components/switchbot/strings.json index fb9f906527c..c00f2fe79e4 100644 --- a/homeassistant/components/switchbot/strings.json +++ b/homeassistant/components/switchbot/strings.json @@ -64,12 +64,6 @@ "calibration": { "name": "Calibration" }, - "motion": { - "name": "[%key:component::binary_sensor::entity_component::motion::name%]" - }, - "door_open": { - "name": "[%key:component::binary_sensor::entity_component::door::name%]" - }, "door_timeout": { "name": "Timeout" }, @@ -102,9 +96,6 @@ "humidity": { "name": "[%key:component::sensor::entity_component::humidity::name%]" }, - "temperature": { - "name": "[%key:component::sensor::entity_component::temperature::name%]" - }, "power": { "name": "[%key:component::sensor::entity_component::power::name%]" }