I got it, and it seems to work just fine. I’ve only played a few minutes after I got all the things done for it, but I can actually SEE the binary change when I short the wires that simulate the float.
It was a mess to figure out and I prowled the web significantly before I found enough information to get it going. In HAOS, there is no data directory at all. I had to create the correct directory external_converters under homeassistant/zigbee2mqtt/ and then put a file in there that had the name ZigbeeOnOffSensor.js with the converter code in it. It appears (haven’t tested it yet) that it’s one file with a unique name for each converter. You have to restart Z2M to get it to read the new file each time you muck with it.
I can handle that just fine now that I know that’s what needs to be done. Plus, looking over your code and the tiny bit of experimenting I’ve done so far that building a custom Zigbee device like this is much simpler than the “examples” show. Your code doesn’t have that security zone stuff in it that causes more confusion than it’s worth.
Your help was superlative in getting me past the problems I got myself into. I really, really hope people that try this happen to see this thread and short circuit their frustration.
Now I have a float sensor to finish building and install. Thanks again for your help.