You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
jankrib
changed the title
Shade position is not cerrectly calculated
Shade position is not correctly calculated
Jun 25, 2023
This does not reproduce with my devices, and I have a snapshot of the states of devices/components from my neighbor reporting this issue, in which all their shPos values are 0 or 100. (And anything 255 relates to slatPos – which our devices don't use – or limeCycle of WaterGuard)
So the calculation is not obviously broken given the devices I've had the ability to look at state for. I looked in the Cordova app for any calculations with shPos, and the ones I could find relate to the 0-100 value range. (It would also make more sense to divide by 255 than subtract it to translate to the percentage value the app operates with. 🧐)
Given this code:
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.
The text was updated successfully, but these errors were encountered: