Skip to content

[bug] Activity group - unused device stays on when switching activities #225

@pkoutsias

Description

@pkoutsias

Is there an existing issue for this?

  • I have searched the existing issues

Description

My setup is the following:

  1. Panasonic TV (IR with discrete power on/off + power toggle codes)
  2. Denon AVR (integration v0.2.3)
  3. Shield (integration v0.4.4)
  4. STB (IR with discrete power on/off + power toggle codes)

I have 2 activities in an activity group (TV):

  • Watch TV with STB, Panasonic TV, Denon AVR
  • Watch Shield with Shield, Panasonic TV, Denon AVR

Individually, both activities work correctly when switched off and all associated entities are turned off, as per the Off sequence.
Switching from Watch Shield to Watch TV, everything works as expected and TV stays on, AVR switches source and STB powers on.

However, switching from Watch TV to Watch Shield the STB stays on (both physically and in the R2 UI).

In the logs I see that the STB entity is not selected for power off:
2023-12-16 06:25:59.783038 +00:00 core NOTICE [TV] entities to power off: []
while Shield is correctly selected:
2023-12-16 06:26:11.062422 +00:00 core NOTICE [TV] entities to power off: ["Shield (uc_androidtv_driver.main.00044B5D8FED) ON"]

Is this expected for IR devices?

How to Reproduce

  1. Create an activity group
  2. Add 2 activities with 2 common and 1 unique entities
  3. Switch from activity A to activity B
  4. Unused entity in activity A stays on

Expected behavior

Unused entities should be turned off when switching activities inside an activity group

System version

1.5.2

What part of the system affected by the problem?

Core

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreCore related issue

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions