Rework RainMachine entity ID generation (#58055)

pull/57919/head
Aaron Bach 2021-10-19 14:10:51 -06:00 committed by GitHub
parent bf7c99c1f8
commit 0fe5baa425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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:

View File

@ -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,