Smart plug is also Sonoff, but will not switch on.
This automation has been set to longpress. On double press I have set to turn a Tuya light switch on (local) and that works without any issue. Prior to moving to MQTT this was working with ZHA (but was having an incredible amount of disconnects, so upgraded to MQTT).
logs: 2021-08-20 10:31:39 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities switch.10007b567c
NB: entity does exist and works aok via lovelace.
- id: '1629407896847'
alias: 'Office Button: Fan'
description: ''
trigger:
- platform: device
domain: mqtt
device_id: efcfcebb6059869b1d8e1588a59568c7
type: action
subtype: long
discovery_id: 0x00124b0022e95a88 action_long
condition: []
action:
- service: switch.toggle
target:
entity_id: switch.10007b567c
mode: single