mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Move Cycle command from cover to button (#89043)
Declare Cycle command as a button
This commit is contained in:
parent
0f493d85c8
commit
a5cf8210ae
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
from pyoverkiz.enums import OverkizCommand
|
||||||
from pyoverkiz.types import StateType as OverkizStateType
|
from pyoverkiz.types import StateType as OverkizStateType
|
||||||
|
|
||||||
from homeassistant.components.button import ButtonEntity, ButtonEntityDescription
|
from homeassistant.components.button import ButtonEntity, ButtonEntityDescription
|
||||||
@ -65,6 +66,11 @@ BUTTON_DESCRIPTIONS: list[OverkizButtonDescription] = [
|
|||||||
name="My position",
|
name="My position",
|
||||||
icon="mdi:star",
|
icon="mdi:star",
|
||||||
),
|
),
|
||||||
|
OverkizButtonDescription(
|
||||||
|
key=OverkizCommand.CYCLE,
|
||||||
|
name="Toggle",
|
||||||
|
icon="mdi:sync",
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
SUPPORTED_COMMANDS = {
|
SUPPORTED_COMMANDS = {
|
||||||
|
@ -27,13 +27,11 @@ COMMANDS_STOP_TILT: list[OverkizCommand] = [
|
|||||||
COMMANDS_OPEN: list[OverkizCommand] = [
|
COMMANDS_OPEN: list[OverkizCommand] = [
|
||||||
OverkizCommand.OPEN,
|
OverkizCommand.OPEN,
|
||||||
OverkizCommand.UP,
|
OverkizCommand.UP,
|
||||||
OverkizCommand.CYCLE,
|
|
||||||
]
|
]
|
||||||
COMMANDS_OPEN_TILT: list[OverkizCommand] = [OverkizCommand.OPEN_SLATS]
|
COMMANDS_OPEN_TILT: list[OverkizCommand] = [OverkizCommand.OPEN_SLATS]
|
||||||
COMMANDS_CLOSE: list[OverkizCommand] = [
|
COMMANDS_CLOSE: list[OverkizCommand] = [
|
||||||
OverkizCommand.CLOSE,
|
OverkizCommand.CLOSE,
|
||||||
OverkizCommand.DOWN,
|
OverkizCommand.DOWN,
|
||||||
OverkizCommand.CYCLE,
|
|
||||||
]
|
]
|
||||||
COMMANDS_CLOSE_TILT: list[OverkizCommand] = [OverkizCommand.CLOSE_SLATS]
|
COMMANDS_CLOSE_TILT: list[OverkizCommand] = [OverkizCommand.CLOSE_SLATS]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user