From 0fe5baa4255fe5a4f879b2ad031335d6ab199c69 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Tue, 19 Oct 2021 14:10:51 -0600 Subject: [PATCH] Rework RainMachine entity ID generation (#58055) --- homeassistant/components/rainmachine/__init__.py | 1 + homeassistant/components/rainmachine/sensor.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/rainmachine/__init__.py b/homeassistant/components/rainmachine/__init__.py index 0fee1259349..b8ea030cb71 100644 --- a/homeassistant/components/rainmachine/__init__.py +++ b/homeassistant/components/rainmachine/__init__.py @@ -344,6 +344,7 @@ class RainMachineEntity(CoordinatorEntity): "sw_version": controller.software_version, } self._attr_extra_state_attributes = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION} + self._attr_name = f"{controller.name} {description.name}" # The colons are removed from the device MAC simply because that value # (unnecessarily) makes up the existing unique ID formula and we want to avoid # a breaking change: diff --git a/homeassistant/components/rainmachine/sensor.py b/homeassistant/components/rainmachine/sensor.py index beb893ddb74..6a1da223758 100644 --- a/homeassistant/components/rainmachine/sensor.py +++ b/homeassistant/components/rainmachine/sensor.py @@ -46,7 +46,7 @@ class RainMachineSensorEntityDescription( SENSOR_DESCRIPTIONS = ( RainMachineSensorEntityDescription( key=TYPE_FLOW_SENSOR_CLICK_M3, - name="Flow Sensor Clicks", + name="Flow Sensor Clicks per Cubic Meter", icon="mdi:water-pump", native_unit_of_measurement=f"clicks/{VOLUME_CUBIC_METERS}", entity_registry_enabled_default=False,