diff --git a/homeassistant/components/flume/binary_sensor.py b/homeassistant/components/flume/binary_sensor.py index 0d7b7b5dd56..453e259bf46 100644 --- a/homeassistant/components/flume/binary_sensor.py +++ b/homeassistant/components/flume/binary_sensor.py @@ -34,8 +34,7 @@ from .entity import FlumeEntity from .util import get_valid_flume_devices BINARY_SENSOR_DESCRIPTION_CONNECTED = BinarySensorEntityDescription( - name="Connected", - key="connected", + key="connected", device_class=BinarySensorDeviceClass.CONNECTIVITY ) @@ -56,14 +55,14 @@ class FlumeBinarySensorEntityDescription( FLUME_BINARY_NOTIFICATION_SENSORS: tuple[FlumeBinarySensorEntityDescription, ...] = ( FlumeBinarySensorEntityDescription( key="leak", - name="Leak detected", + translation_key="leak", entity_category=EntityCategory.DIAGNOSTIC, event_rule=NOTIFICATION_LEAK_DETECTED, icon="mdi:pipe-leak", ), FlumeBinarySensorEntityDescription( key="flow", - name="High flow", + translation_key="flow", entity_category=EntityCategory.DIAGNOSTIC, event_rule=NOTIFICATION_HIGH_FLOW, icon="mdi:waves", diff --git a/homeassistant/components/flume/sensor.py b/homeassistant/components/flume/sensor.py index 9900b494821..fc08fee476c 100644 --- a/homeassistant/components/flume/sensor.py +++ b/homeassistant/components/flume/sensor.py @@ -33,13 +33,13 @@ from .util import get_valid_flume_devices FLUME_QUERIES_SENSOR: tuple[SensorEntityDescription, ...] = ( SensorEntityDescription( key="current_interval", - name="Current", + translation_key="current_interval", suggested_display_precision=2, native_unit_of_measurement=f"{UnitOfVolume.GALLONS}/m", ), SensorEntityDescription( key="month_to_date", - name="Current Month", + translation_key="month_to_date", suggested_display_precision=2, native_unit_of_measurement=UnitOfVolume.GALLONS, device_class=SensorDeviceClass.WATER, @@ -47,7 +47,7 @@ FLUME_QUERIES_SENSOR: tuple[SensorEntityDescription, ...] = ( ), SensorEntityDescription( key="week_to_date", - name="Current Week", + translation_key="week_to_date", suggested_display_precision=2, native_unit_of_measurement=UnitOfVolume.GALLONS, device_class=SensorDeviceClass.WATER, @@ -55,7 +55,7 @@ FLUME_QUERIES_SENSOR: tuple[SensorEntityDescription, ...] = ( ), SensorEntityDescription( key="today", - name="Current Day", + translation_key="today", suggested_display_precision=2, native_unit_of_measurement=UnitOfVolume.GALLONS, device_class=SensorDeviceClass.WATER, @@ -63,21 +63,21 @@ FLUME_QUERIES_SENSOR: tuple[SensorEntityDescription, ...] = ( ), SensorEntityDescription( key="last_60_min", - name="60 Minutes", + translation_key="last_60_min", suggested_display_precision=2, native_unit_of_measurement=f"{UnitOfVolume.GALLONS}/h", state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="last_24_hrs", - name="24 Hours", + translation_key="last_24_hrs", suggested_display_precision=2, native_unit_of_measurement=f"{UnitOfVolume.GALLONS}/d", state_class=SensorStateClass.MEASUREMENT, ), SensorEntityDescription( key="last_30_days", - name="30 Days", + translation_key="last_30_days", suggested_display_precision=2, native_unit_of_measurement=f"{UnitOfVolume.GALLONS}/mo", state_class=SensorStateClass.MEASUREMENT, diff --git a/homeassistant/components/flume/strings.json b/homeassistant/components/flume/strings.json index 080f10deee1..2c1a900c091 100644 --- a/homeassistant/components/flume/strings.json +++ b/homeassistant/components/flume/strings.json @@ -28,5 +28,38 @@ "reauth_successful": "[%key:common::config_flow::abort::reauth_successful%]", "already_configured": "[%key:common::config_flow::abort::already_configured_account%]" } + }, + "entity": { + "binary_sensor": { + "leak": { + "name": "Leak detected" + }, + "flow": { + "name": "High flow" + } + }, + "sensor": { + "current_interval": { + "name": "Current" + }, + "month_to_date": { + "name": "Current month" + }, + "week_to_date": { + "name": "Current week" + }, + "today": { + "name": "Current day" + }, + "last_60_min": { + "name": "60 minutes" + }, + "last_24_hrs": { + "name": "24 hours" + }, + "last_30_days": { + "name": "30 days" + } + } } }