I have a mqtt message coming in like
/swtich/1 123
Where the 123 is a reading which isn’t important but changes every time. Basically, if I see ANY value from this topic I want to toggle the switch on but I don’t see how this possible since it seems I either have to provide a value or it will default to true.
- platform: mqtt¬
name: "Switch"¬
state_topic: "power/"¬
qos: 1¬
retain: true¬
payload_on: "on"¬
payload_off: "off"¬