Harmony Automation stop working

Hello i have a problem with my automation before it was working fine but now it doesn’t work anymore.

I have a nintendo switch console connected to a sonoff basic switch. The automation to turn it on works fine, unfortunately when i change or turn off the activity it won’t follow and turn off the switch.

I’m pretty sure before it was working, i don’t understand. Here is my automation:

- alias: '[Switch] PowerOff SWITCH TV et Sonoff3'
  initial_state: on
  trigger:
    - platform: state
      entity_id: remote.harmony_hub
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: input_select.harmony_hub
        state: 'SWITCH TV'
      - condition: or
        conditions:
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "PowerOff" }}'
          - condition: template      
            value_template: '{{ trigger.to_state.attributes.current_activity == "APPLE TV" }}'    
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "ONE TV" }}'
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "PS4 TV" }}'   
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "SMART TV" }}'
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "PC TV" }}'    
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "360 TV" }}'
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "RETRO TV" }}'     
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "MOVIES TV" }}'
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "ONE" }}'    
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "MOVIES" }}'
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "PS4" }}'   
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "CHROMECAST" }}'
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "PC" }}'    
          - condition: template
            value_template: '{{ trigger.to_state.attributes.current_activity == "RETRO" }}'       
  action:
    - service: switch.turn_off
      entity_id: switch.sonoff3      

Thanks.

Having the same issue - I wonder if the change to the harmony websockets isn’t triggering automations. Anyone have any advice?

It works for me, although I did not update the Logitech to the newest software version, but I assume HA is using web sockets either way.

Btw, why do you list all the activities when you could just check if to_state is not Switch?

- alias: '[Switch] PowerOff SWITCH TV et Sonoff3'
  initial_state: on
  trigger:
    - platform: state
      entity_id: remote.harmony_hub
  condition:
    condition: and
    conditions:
      - condition: template
        value_template: '{{ trigger.from_state.attributes.current_activity == "SWITCH TV" }}'
      - condition: template
        value_template: '{{ trigger.to_state.attributes.current_activity != "SWITCH TV" }}'
  action:
    - service: switch.turn_off
      entity_id: switch.sonoff3

Interesting, thanks for the tips.