MQTT Publish on any eWelink addon status change

I want to create an automation to publish an JSON throught MQTT everytime which an eWelink device change a status (I´m using the official eWelink with my Sonoff devices).
I’ve created one but only selecting one by one:

Blockquote - id: ‘1646193334594’
alias: Status Interruptor Escritório - MQTT
description: ‘’
trigger:
- platform: state
entity_id: switch.1000xxxxxx
- platform: state
entity_id: switch.1000yyyyyy
- platform: time_pattern
minutes: /1
condition:
action:
- service: mqtt.publish
data:
topic: home-assistant/switch/ofc
payload: ‘{ “ofcCeil”: "{{ states(’‘switch.100xxxxxx’‘) }}", “ofcDic”: "{{
states(’‘switch.1000yyyyyy’‘) }}" }’
mode: single

Is it possible to create something which trigger everytime an eWelink device change the status and get it’s id and publish?