Skip to content

Commit

Permalink
bump: version 4.14.0 → 4.15.0b0
Browse files Browse the repository at this point in the history
  • Loading branch information
xaviml committed Aug 8, 2021
1 parent 71c4bad commit 8c96cee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .cz.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.commitizen]
name = "cz_conventional_commits"
version = "4.14.0"
version = "4.15.0b0"
tag_format = "v$major.$minor.$patch$prerelease"
version_files = [
"apps/controllerx/cx_version.py",
Expand Down
14 changes: 10 additions & 4 deletions apps/controllerx/cx_core/type/light_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def get_predefined_actions_mapping(self) -> PredefinedActionsMapping:
),
),
Light.SYNC: self.sync,
Light.CLICK: self.click,
Light.CLICK_BRIGHTNESS_UP: (
self.click,
(
Expand Down Expand Up @@ -518,6 +519,11 @@ async def colortemp_from_controller(self, extra: Optional[EventData]) -> None:
return
await self._on(color_temp=extra["action_color_temperature"])

def _get_stepper(self, attribute: str, steps: int, mode: str) -> Stepper:

if mode == "stopper":
stepper = MinMaxStepper()

async def get_attribute(self, attribute: str) -> str:
if attribute == LightController.ATTRIBUTE_COLOR:
if self.entity.color_mode == "auto":
Expand Down Expand Up @@ -593,7 +599,7 @@ async def before_action(self, action: str, *args, **kwargs) -> bool:
return await super().before_action(action, *args, **kwargs) and to_return

@action
async def click(self, attribute: str, direction: str) -> None:
async def click(self, attribute: str, direction: str, mode: str = "stopper") -> None:
attribute = await self.get_attribute(attribute)
self.value_attribute = await self.get_value_attribute(attribute)
await self.change_light_state(
Expand All @@ -605,7 +611,7 @@ async def click(self, attribute: str, direction: str) -> None:
)

@action
async def hold(self, attribute: str, direction: str) -> None: # type: ignore
async def hold(self, attribute: str, direction: str, mode: str = "stopper") -> None: # type: ignore
attribute = await self.get_attribute(attribute)
self.value_attribute = await self.get_value_attribute(attribute)
self.log(
Expand All @@ -621,9 +627,9 @@ async def hold(self, attribute: str, direction: str) -> None: # type: ignore
self.value_attribute, direction
)
self.log(f"Going direction: {direction}", level="DEBUG")
await super().hold(attribute, direction)
await super().hold(attribute, direction, mode)

async def hold_loop(self, attribute: str, direction: str) -> bool: # type: ignore
async def hold_loop(self, attribute: str, direction: str, mode: str) -> bool: # type: ignore
if self.value_attribute is None:
return True
return await self.change_light_state(
Expand Down
2 changes: 1 addition & 1 deletion apps/controllerx/cx_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "v4.14.0"
__version__ = "v4.15.0b0"

0 comments on commit 8c96cee

Please sign in to comment.