Skip to content

[feature request] Extend Activity Groups state tracking beyond power states (covers, positions, etc.) #823

Open

Description

@d22b

Is there an existing issue for this?

  • I have searched the existing issues

Description

Activity Groups already provide useful state-aware behavior for power states: when switching between activities, a POWER_ON command can be skipped if an entity is already in the ON state.

It would be very useful to extend this concept beyond simple ON/OFF power states and support state-aware transitions for other entity types and attributes, especially cover entities.

A typical home cinema example is a motorized projection screen.

Example:

Activity A – PS5

  • Projector ON
  • AVR ON
  • Projection screen DOWN / CLOSED
  • PS5 ON
  • AVR input = GAME

Activity B – Media Player

  • Projector ON
  • AVR ON
  • Projection screen DOWN / CLOSED
  • Media player ON
  • AVR input = MEDIA

When switching from Activity A to Activity B, the screen is already down. However, the screen command in the start sequence is executed again.

The desired behavior would be similar to the existing power-state handling:

Current screen state: CLOSED / DOWN
Target state in new activity: CLOSED / DOWN
=> Skip the redundant screen command

Only when switching to an activity whose desired state differs should the command be sent:

Current screen state: CLOSED / DOWN
Target state: OPEN / UP
=> Send OPEN / UP

Suggested implementation

Activity Groups could maintain or use a desired/current state for supported entity attributes and compare it with the target state of the next activity.

For example:

  • switch: ON / OFF
  • cover: OPEN / CLOSED / position
  • light: ON / OFF / brightness
  • select: selected option
  • media_player: input/source where appropriate

If the integration provides a real state, that state could be used.

For devices without state feedback, an optional internal shadow state could be maintained based on the last successfully executed command. This is similar to the state-tracking approach traditionally used by universal remotes such as Logitech Harmony.

The shadow state would only be an assumed state and could of course become incorrect if the device is operated outside the Remote, but this is already a known limitation for state-less IR devices.

Why this is useful

This would make Activity Groups behave more like a true state-transition engine:

current system state
↓
compare with target activity
↓
execute only the differences

instead of replaying commands whose target state has already been reached.

For motorized equipment this is especially useful because unnecessarily repeating commands can cause:

  • repeated screen movement commands
  • unnecessary relay/motor activation
  • additional delays during activity switching
  • undesirable mechanical operations
  • less seamless activity transitions

Relation to existing functionality

Issue #64 already implements state-aware handling for power commands in Activity Groups.

Issue #565 also confirms that activity start sequences can take an entity’s reported ON/OFF state into account and skip an unnecessary power-on command.

This request is to extend that existing concept from power state only to other stateful entity types and attributes, particularly cover position/state.

Additional context

My concrete use case is a motorized projection screen shared by multiple home cinema activities.

Several activities require the screen to remain down. Switching between those activities should therefore not send the DOWN/CLOSE command again.

The important part of this request is not the projection screen itself, but the more general ability for Activity Groups to perform state-aware / delta-based transitions for non-power states.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions