And now this seems better

This commit is contained in:
Jordan Zucker 2024-11-18 09:46:31 -08:00
parent a96cf23cc7
commit 6182861297
2 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ IncreaseButton = vornado_ir_ns.class_("IncreaseButton", button.Button)
DecreaseButton = vornado_ir_ns.class_("DecreaseButton", button.Button) DecreaseButton = vornado_ir_ns.class_("DecreaseButton", button.Button)
# Vornado IR buttons # Vornado IR buttons
CONF_POWER = "power" CONF_POWER_TOGGLE = "power_toggle"
CONF_CHANGE_DIRECTION = "change_direction" CONF_CHANGE_DIRECTION = "change_direction"
CONF_INCREASE = "increase" CONF_INCREASE = "increase"
CONF_DECREASE = "decrease" CONF_DECREASE = "decrease"
@ -25,7 +25,7 @@ ICON_DECREASE = "mdi:fan-minus"
CONFIG_SCHEMA = cv.Schema( CONFIG_SCHEMA = cv.Schema(
{ {
cv.GenerateID(CONF_VORNADO_ID): cv.use_id(VornadoIR), cv.GenerateID(CONF_VORNADO_ID): cv.use_id(VornadoIR),
cv.Optional(CONF_POWER): button.button_schema( cv.Optional(CONF_POWER_TOGGLE): button.button_schema(
PowerButton, PowerButton,
icon=ICON_POWER_TOGGLE, icon=ICON_POWER_TOGGLE,
), ),
@ -47,7 +47,7 @@ CONFIG_SCHEMA = cv.Schema(
async def to_code(config): async def to_code(config):
for button_type in [ for button_type in [
CONF_POWER, CONF_POWER_TOGGLE,
CONF_CHANGE_DIRECTION, CONF_CHANGE_DIRECTION,
CONF_INCREASE, CONF_INCREASE,
CONF_DECREASE, CONF_DECREASE,

View file

@ -8,7 +8,7 @@ vornado_ir:
button: button:
- platform: vornado_ir - platform: vornado_ir
vornado_id: vornado_ir_remote vornado_id: vornado_ir_remote
power: power_toggle:
name: Vornado IR Power Toggle name: Vornado IR Power Toggle
change_direction: change_direction:
name: Vornado IR Change Direction name: Vornado IR Change Direction