I’m trying to hook up a wifi light bulb to Home Assistant via MQTT and I’m having an issue with the payload. The light is a TechLife Pro (cheap as chips Chinese thing from AliExpress) and so far I’ve figured out that it works by connecting to an MQTT broker in China (not ideal, but ok for now) and sending 0xfa0x230x000x000x000x000x000x000x000x000x000x000x000x000x230xfb as the payload for “on” and 0xfa0x240x000x000x000x000x000x000x000x000x000x000x000x000x240xfb as the payload for off. If I send these values via mosquitto_pub, it works as expected:
echo -en "\xfa\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\xfb" | mosquitto_pub -t "dev_sub_mylightsmac" -s -h "cloud.qh-tek.com" -u "myuser" -P "mypass"
That switches the light on, correctly, and the equivalent (with 24 instead of 23) switches it off again.
For the life of me, I can’t find the equivalent string to put in the payload_on and payload_off lines of my MQTT light config in configuration.yaml. I’ve googled everything I can think of, I can only assume my query is either so simple nobody else ever needed to ask, or impossible and no one else was daft enough to ask.
How do I instruct Home Assistant to send the actual bytes and not the string representation?