That looks good. My only question would be why the IP address for HA_MQTT doesn’t start with 172 but the one for MQTT Explorer does (In my case it’s the other way around. HA_MQTT is from a docker container so its address starts with 172 and MQTT Explorer is on a separate computer whose IP address starts with 192). Anyway, let’s skip that for now (it’s probably irrelevant) and proceed with this simple test:
Go to Settings > Devices & Services > Integrations
Click the MQTT integration
Click Configure
Under ‘Listen to a topic’, enter junk in ‘Topic to Subscribe to’ (not /junk but junk)
Click ‘Start Listening’ and leave the web page open.
Go to MQTT Explorer and publish any simple payload (like hello) to the topic junk (not /junk but junk)
Look on the ‘Listen to a topic’ web page for the payload you just published.
If it’s not there then there’s still a communication problem between Home Assistant and the broker.
If it is there, then it implies there may be a configuration problem with your MQTT sensors.
If they are not receiving payloads then it means your script and sensors aren’t using the same topic. One is using a topic with a leading slash and the other one isn’t.
Home Assistant can receive payloads published to a topic
Your python script can publish payloads to a topic
Your MQTT Sensors are subscribed to the same topic used by your python script
Yet your MQTT Sensors fail to receive the payloads published by your python script to a topic they share.
There’s missing, misleading, or incorrect information somewhere, in the debugging process, because at this point (six confirmed critical steps) the MQTT Sensors should be receiving data.
Use MQTT Explorer to publish the following payload to home/pi_zero/temp1
19.9
That’s 19.9 with a period and not 19,9 with a comma.
Then check the state of sensor.temperatur_wohnzimmer.
If the sensor reports the published value, repeat the test but this time use a different value containing a comma like 19,5 and let me know if the sensor displays that value or not.
The goal of these tests is to determine if a published numeric value can or cannot contain a comma.
NOTE
The MQTT Sensors are configured with unit_of_measurement and I am speculating that the option might impose constraints on the data’s format. In other words, it might consider 19,1 to be non-numeric and reject it.