Skip to content

Shade position is not correctly calculated #23

@jankrib

Description

@jankrib

image

Given this code:

    def current_cover_position(self) -> int | None:
        if self._state:
            # xcomfort interprets 90% to be almost fully closed,
            # while HASS UI makes 90% look almost open, so we
            # invert.
            return 100 - self._state.position

It looks like the position is reported as a byte 0 to 255, giving 100-255=-155.

Does this mean position is reported differently for different devices or is it simply a bug for all?

I would love your input here @alexbrasetvik since the current calculation is based on your shades.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions