Skip to content

Feature: cover cycle action with position-safe Up/Stop/Down

Choose a tag to compare

@github-actions github-actions released this 16 Apr 17:10
· 5 commits to main since this release

New Feature: Cover Cycle Action Type

Adds cover_cycle as a new button action type, enabling Lutron-style Up / Stop / Down cycling over one or more cover entities without ever forcing an absolute position.

Cycle Logic

Current state Button press issues
Any cover moving (opening/closing) stop_cover — stops all covers
All covers at position ≤ 5% (or closed) open_cover — opens all covers
All covers at position ≥ 95% (or open) close_cover — closes all covers
Stopped mid-travel Resumes in last direction (open or close)

Position thresholds (5% / 95%) handle covers that never reach exact 0 or 100. Last-direction memory persists across button presses and survives integration reloads.

Multiple Covers

Enter a comma-separated list of cover entity IDs in the entity field:

cover.living_room_shade, cover.office_shade

All covers in the list are controlled together. LED state reflects the group: ON when any cover is open/opening (position > 5%), OFF when all are closed/closing.

LED Behavior

  • ON = any cover position > 5% or state is open / opening
  • OFF = all covers position ≤ 5% or state is closed / closing

The LED syncs automatically when covers are moved by other automations or by hand.

direction_key Scoping

Each button on each keypad gets its own direction memory key ({entry_id}_{button_index}), so multiple keypads sharing the same HA instance don't interfere.

Other Changes

  • async_execute_action gains **kwargs (backwards-compatible); all call sites pass direction_key for proper scoping
  • action_executor.py is now the single authoritative executor — removed the stale duplicate that was in __init__.py
  • get_tracked_state() returns correct initial LED state for cover_cycle buttons on HA startup

Files Changed

  • cover_controller.py (new) — CoverCycleController with cycle logic, direction memory, LED state computation
  • action_executor.py — cover_cycle branch, **kwargs, updated get_tracked_state
  • __init__.py — remove local executor duplicate, cover_cycle entity tracking, direction_key passing
  • switch.py — cover_cycle short-circuit in _apply_state
  • config_flow.py — free-text entity field for cover_cycle buttons
  • const.py — ACTION_TYPE_COVER_CYCLE, cover state/service constants
  • strings.json / translations/en.json — cover_hint placeholder in entities step
  • manifest.json — bumped to 1.4.0