Move Cycle command from cover to button (#89043)

Declare Cycle command as a button
This commit is contained in:
Thibaut 2023-03-03 08:38:07 +01:00 committed by GitHub
parent 0f493d85c8
commit a5cf8210ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@ from __future__ import annotations
from dataclasses import dataclass
from pyoverkiz.enums import OverkizCommand
from pyoverkiz.types import StateType as OverkizStateType
from homeassistant.components.button import ButtonEntity, ButtonEntityDescription
@ -65,6 +66,11 @@ BUTTON_DESCRIPTIONS: list[OverkizButtonDescription] = [
name="My position",
icon="mdi:star",
),
OverkizButtonDescription(
key=OverkizCommand.CYCLE,
name="Toggle",
icon="mdi:sync",
),
]
SUPPORTED_COMMANDS = {

View File

@ -27,13 +27,11 @@ COMMANDS_STOP_TILT: list[OverkizCommand] = [
COMMANDS_OPEN: list[OverkizCommand] = [
OverkizCommand.OPEN,
OverkizCommand.UP,
OverkizCommand.CYCLE,
]
COMMANDS_OPEN_TILT: list[OverkizCommand] = [OverkizCommand.OPEN_SLATS]
COMMANDS_CLOSE: list[OverkizCommand] = [
OverkizCommand.CLOSE,
OverkizCommand.DOWN,
OverkizCommand.CYCLE,
]
COMMANDS_CLOSE_TILT: list[OverkizCommand] = [OverkizCommand.CLOSE_SLATS]