Removing the () brackets fixed it, thank you. I then didn't touch the curly brackets.client.publish("sensor1",temperature_formatted()) omit the braces after temperature_formatted
And, perhaps, omit the braces in
temperature_formatted = ( f"{temperature:.1f}" )
Side topic, I would add a client.loop_start() after the connect.
client.loop_start() added - thanks for the tip.
Statistics: Posted by richard238 — Sun Apr 20, 2025 3:36 pm