Repository: home-assistant/core
File: homeassistant/components/waterfurnace/sensor.py (Python)

Code before:
        WaterFurnaceSensor(coordinator, description) for description in SENSORS
    )


class WaterFurnaceSensor(CoordinatorEntity[WaterFurnaceCoordinator], SensorEntity):
    """Implementing the Waterfurnace sensor."""

    entity_description: SensorEntityDescription
    _attr_should_poll = False
    _attr_has_entity_name = True

    def __init__(
        self, coordinator: WaterFurnaceCoordinator, description: SensorEntityDescription
    ) -> None:
        """Initialize the sensor."""
        super().__init__(coordinator)
        self.entity_description = description

        # This ensures that the sensors are isolated per waterfurnace unit
        self.entity_id = ENTITY_ID_FORMAT.format(
            f"wf_{slugify(coordinator.unit)}_{slugify(description.key)}"
        )
        self._attr_unique_id = f"{coordinator.unit}_{description.key}"

        device_info = DeviceInfo(
            identifiers={(DOMAIN, self.coordinator.unit)},
            manufacturer="WaterFurnace",
            name="WaterFurnace System",
        )

        if self.coordinator.device_metadata:
            if self.coordinator.device_metadata.description:
                # Eg. Series 7
                device_info["model"] = self.coordinator.device_metadata.description
            if self.coordinator.device_metadata.awlabctypedesc:
                # Eg. Series 7, 5 Ton
                device_info["name"] = self.coordinator.device_metadata.awlabctypedesc

        self._attr_device_info = device_info

    @property
    def native_value(self):
        """Return the native value of the sensor."""
        return getattr(self.coordinator.data, self.entity_description.key, None)


Review comment (suggestion):
```suggestion
            identifiers={(DOMAIN, coordinator.unit)},
```

Code after:
        WaterFurnaceSensor(coordinator, description) for description in SENSORS
    )


class WaterFurnaceSensor(CoordinatorEntity[WaterFurnaceCoordinator], SensorEntity):
    """Implementing the Waterfurnace sensor."""

    entity_description: SensorEntityDescription
    _attr_should_poll = False
    _attr_has_entity_name = True

    def __init__(
        self, coordinator: WaterFurnaceCoordinator, description: SensorEntityDescription
    ) -> None:
        """Initialize the sensor."""
        super().__init__(coordinator)
        self.entity_description = description

        # This ensures that the sensors are isolated per waterfurnace unit
        self.entity_id = ENTITY_ID_FORMAT.format(
            f"wf_{slugify(coordinator.unit)}_{slugify(description.key)}"
        )
        self._attr_unique_id = f"{coordinator.unit}_{description.key}"

        device_info = DeviceInfo(
            identifiers={(DOMAIN, coordinator.unit)},
            manufacturer="WaterFurnace",
            name="WaterFurnace System",
        )

        if coordinator.device_metadata:
            if coordinator.device_metadata.description:
                # Eg. Series 7
                device_info["model"] = coordinator.device_metadata.description
            if coordinator.device_metadata.awlabctypedesc:
                # Eg. Series 7, 5 Ton
                device_info["name"] = coordinator.device_metadata.awlabctypedesc

        self._attr_device_info = device_info

    @property
    def native_value(self):
        """Return the native value of the sensor."""
        return getattr(self.coordinator.data, self.entity_description.key, None)