mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-12 09:34:28 +05:00
Compare commits
2 Commits
v1.0.10b19
...
v1.0.10b20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28bf4393f0 | ||
|
|
5ecb246eff |
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[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*)
|
parse = (?P<major>\d+)(\.(?P<minor>\d+))(\.(?P<patch>\d+))(?P<release>[bf]*)(?P<build>\d*)
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
|
|||||||
@@ -430,6 +430,8 @@ class MegaOutPort(MegaPushEntity):
|
|||||||
))
|
))
|
||||||
|
|
||||||
def _calc_brightness(self, brightness):
|
def _calc_brightness(self, brightness):
|
||||||
|
if brightness is None:
|
||||||
|
brightness = 0
|
||||||
pct = brightness / 255
|
pct = brightness / 255
|
||||||
pct = max((0, pct))
|
pct = max((0, pct))
|
||||||
pct = min((pct, 1))
|
pct = min((pct, 1))
|
||||||
@@ -439,6 +441,8 @@ class MegaOutPort(MegaPushEntity):
|
|||||||
return brightness
|
return brightness
|
||||||
|
|
||||||
def _cal_reverse_brightness(self, brightness):
|
def _cal_reverse_brightness(self, brightness):
|
||||||
|
if brightness is None:
|
||||||
|
brightness = 0
|
||||||
l, h = self.range
|
l, h = self.range
|
||||||
d = h - l
|
d = h - l
|
||||||
pct = (brightness - l) / d
|
pct = (brightness - l) / d
|
||||||
|
|||||||
@@ -15,5 +15,5 @@
|
|||||||
"@andvikt"
|
"@andvikt"
|
||||||
],
|
],
|
||||||
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
|
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
|
||||||
"version": "v1.0.10b19"
|
"version": "v1.0.10b20"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user