Logitech Harmony activity change not triggering automation

After one of recent updates (judging at last triggered date it was 2022.09) one of my automations stopped to work. Basically it just turns the light on in TV room when all devices are switched off by Harmony remote. Here is the automation code:

- alias: "Turn up lights on TV Power Off"
  initial_state: true
  trigger:
    platform: state
    entity_id: sensor.tv_room_harmony_activity
    to: 'PowerOff'
  condition:
    - condition: state
      entity_id: light.tv_illumination
      state: 'on'
  action:
    - service: light.turn_on
      data:
        entity_id:
          - light.tv_illumination
          - light.desk_lamp
          - light.shelf_illumination
          - light.tv_room_main
        brightness: 100
        transition: 3
    - service: light.turn_on
      data:
        entity_id:
          - light.tv_illumination
          - light.desk_lamp
          - light.tv_room_main
        brightness: 255
        transition: 3

I think any issues with conditions can be disregarded, as this automation does not trigger at all - there is no trace of it being run and not being executed due to conditions in Debug automation. There is no trace of it being triggered at all… So it looks like trigger is failing. On the other hand I can see that state of this sensor changes to PowerOff so it should trigger… Also if it is changing from PowerOff (that is used in other automations) it triggers properly.
Here you can see sensor state changes:
Screenshot 2022-09-03 at 22.19.32
And here Debug automation:


There is also no entry about this automation in the log… What might be the reason for trigger not working? How get this working again?

I think your trigger is wrong. Here is mine, working like a charm:

trigger:
  - platform: state
    entity_id: remote.salon
    from: "off"
    to: "on"
  - platform: state
    entity_id: remote.salon
    from: "on"
    to: "off"

OK, I found the problem, it seems I have some race condition in my setup. it is condition for checking if the TV lights are on is causing problem… for some reason previously process of turning off these light was slow enought for this condition to work (so assumption was if these light are on, I’m watching TV late in the evening and I should turn on full lights after turning TV off). Now these light turns off too fast, before this particular autyomation is triggered. Easy to fix.