Ok, this should all work, but I must be missing something.
I am a bit of a newby….but please help.
I have copied this code directly but updated the MAC address, IP number, and unique ID (so it stood out more). My code compiles and writes to the arduino successfully.
I can see my Arduino and ping it on the network.
Under MQTT on HA, I am able to publish to myself using the manual publish and listen feature. I have listen set to #, so I am listening to all traffic. So mosquito appears to be working. Discovery is on.
For some reason, I do not get a new sensor created using this code.
Anyone have any ideas? I am assuming the simplicity of this code should work and I am concerned with adding to it until it works on a basic level. Other examples are similar so I am guessing I have a mistake or missing component or setting.