Compare commits

..

2 Commits

Author SHA1 Message Date
andvikt
28bf4393f0 Bump version: 1.0.10b19 → 1.0.10b20 2021-10-29 19:53:01 +03:00
andvikt
5ecb246eff fix brightness 2021-10-29 19:52:10 +03:00
3 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.10b19
current_version = 1.0.10b20
parse = (?P<major>\d+)(\.(?P<minor>\d+))(\.(?P<patch>\d+))(?P<release>[bf]*)(?P<build>\d*)
commit = True
tag = True

View File

@@ -430,6 +430,8 @@ class MegaOutPort(MegaPushEntity):
))
def _calc_brightness(self, brightness):
if brightness is None:
brightness = 0
pct = brightness / 255
pct = max((0, pct))
pct = min((pct, 1))
@@ -439,6 +441,8 @@ class MegaOutPort(MegaPushEntity):
return brightness
def _cal_reverse_brightness(self, brightness):
if brightness is None:
brightness = 0
l, h = self.range
d = h - l
pct = (brightness - l) / d

View File

@@ -15,5 +15,5 @@
"@andvikt"
],
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
"version": "v1.0.10b19"
"version": "v1.0.10b20"
}