Repository: home-assistant/core
File: homeassistant/components/velux/cover.py (Python)

Code before:
    @wrap_pyvlx_call_exceptions
    async def async_open_cover(self, **kwargs: Any) -> None:
        """Open the cover."""
        await self.node.open(wait_for_completion=False)

    @wrap_pyvlx_call_exceptions
    async def async_set_cover_position(self, **kwargs: Any) -> None:
        """Move the cover to a specific position."""
        position_percent = 100 - kwargs[ATTR_POSITION]

        await self.node.set_position(
            Position(position_percent=position_percent), wait_for_completion=False
        )

    @wrap_pyvlx_call_exceptions
    async def async_stop_cover(self, **kwargs: Any) -> None:
        """Stop the cover."""
        await self.node.stop(wait_for_completion=False)


class VeluxDualRollerPart(Enum):
    """Enum for the parts of a dual roller shutter."""

    upper = auto()
    lower = auto()
    dual = auto()


class VeluxDualRollerShutter(VeluxCover):
    """Representation of a Velux dual roller shutter cover."""

    node: DualRollerShutter
    _attr_device_class = CoverDeviceClass.SHUTTER

    def __init__(
        self, node: DualRollerShutter, config_entry_id: str, part: VeluxDualRollerPart
    ) -> None:
        """Initialize VeluxDualRollerShutter."""
        super().__init__(node, config_entry_id)
        if part == VeluxDualRollerPart.dual:
            self._attr_name = None
        else:
            self._attr_unique_id = f"{self._attr_unique_id}_{part.name}"
            self._attr_translation_key = f"dual_roller_shutter_{part.name}"
        self.part = part

    @property
    def current_cover_position(self) -> int:
        """Return the current position of the cover."""
        if self.part == VeluxDualRollerPart.upper:
            return 100 - self.node.position_upper_curtain.position_percent

Review comment (suggestion):
```suggestion
class VeluxDualRollerPart(StrEnum):
    """Enum for the parts of a dual roller shutter."""

    UPPER = "upper"
    LOWER = "lower"
    DUAL = "dual"
```
Generally enums are uppercase

Code after:
    @wrap_pyvlx_call_exceptions
    async def async_open_cover(self, **kwargs: Any) -> None:
        """Open the cover."""
        await self.node.open(wait_for_completion=False)

    @wrap_pyvlx_call_exceptions
    async def async_set_cover_position(self, **kwargs: Any) -> None:
        """Move the cover to a specific position."""
        position_percent = 100 - kwargs[ATTR_POSITION]

        await self.node.set_position(
            Position(position_percent=position_percent), wait_for_completion=False
        )

    @wrap_pyvlx_call_exceptions
    async def async_stop_cover(self, **kwargs: Any) -> None:
        """Stop the cover."""
        await self.node.stop(wait_for_completion=False)


class VeluxDualRollerPart(StrEnum):
    """Enum for the parts of a dual roller shutter."""

    UPPER = "upper"
    LOWER = "lower"
    DUAL = "dual"


class VeluxDualRollerShutter(VeluxCover):
    """Representation of a Velux dual roller shutter cover."""

    node: DualRollerShutter
    _attr_device_class = CoverDeviceClass.SHUTTER

    def __init__(
        self, node: DualRollerShutter, config_entry_id: str, part: VeluxDualRollerPart
    ) -> None:
        """Initialize VeluxDualRollerShutter."""
        super().__init__(node, config_entry_id)
        if part == VeluxDualRollerPart.DUAL:
            self._attr_name = None
        else:
            self._attr_unique_id = f"{self._attr_unique_id}_{part}"
            self._attr_translation_key = f"dual_roller_shutter_{part}"
        self.part = part

    @property
    def current_cover_position(self) -> int:
        """Return the current position of the cover."""
        if self.part == VeluxDualRollerPart.UPPER:
            return 100 - self.node.position_upper_curtain.position_percent