mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-12 09:34:28 +05:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
58a4680311 | ||
|
|
00e62ee83f | ||
|
|
b62406210c |
@@ -1,5 +1,5 @@
|
|||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 1.1.7
|
current_version = 1.1.8b0
|
||||||
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
|
||||||
|
|||||||
@@ -244,9 +244,12 @@ class MegaRGBW(LightEntity, BaseMegaEntity):
|
|||||||
async def set_color(self, _before, **kwargs):
|
async def set_color(self, _before, **kwargs):
|
||||||
transition = kwargs.get('transition')
|
transition = kwargs.get('transition')
|
||||||
update_state = transition is not None and transition > 3
|
update_state = transition is not None and transition > 3
|
||||||
|
_after = None
|
||||||
for item, value in kwargs.items():
|
for item, value in kwargs.items():
|
||||||
setattr(self, f'_{item}', value)
|
setattr(self, f'_{item}', value)
|
||||||
_after = self.get_rgbw()
|
if item == 'rgb_color':
|
||||||
|
_after = value
|
||||||
|
_after = _after or self.get_rgbw()
|
||||||
self._rgb_color = tuple(_after[:3])
|
self._rgb_color = tuple(_after[:3])
|
||||||
if transition is None:
|
if transition is None:
|
||||||
transition = self.smooth.total_seconds()
|
transition = self.smooth.total_seconds()
|
||||||
|
|||||||
@@ -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.1.7"
|
"version": "v1.1.8b0"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user