This component allows you to publish a custom payload to a custom topic(s) for an ESPHome switch component.
This makes it easier to integrate with HomeKit which expects a 0
or 1
instead of ON
/OFF
for switches.
Example configuration for publishing a relay's state as 0
or 1
to a custom topic which is compatible with mqtt2homekit
(more info):
esphome: