Hi,
Hoping someone can help me here.
I have a DHT22 sensor hooked up to a raspberry pi and pushing its temperature out to my MQTT Broker. The output is formatted to 3 decimal places e.g 22.5.
I have setup the sensor in home assistant with the following code
- platform: mqtt
name: Bedroom Temperature
state_topic: "homeassistant/sensors/DHT22/temperature"
unit_of_measurement: 'C'
I also have a relay connected to the PI and setup as a switch in home assistant. The relay turns on and off by the home assistant switch publishing MQTT messages to the Pi to turn it on or off.
So far so good this all works, the temperature shows up in HA and I can turn the relay off using a switch on the front end of HA.
I have now setup a climate script as outlined by HA.
in my configuration.yaml I have added the following line
climate: !include climate.yaml
In climate.yaml I have setup the following code
- platform: generic_thermostat
name: Bedroom Thermostat
heater: switch.mqtt_relay
target_sensor: sensor.bedroom_temperature
min_temp: 22.9
max_temp: 29
target_temp: 24
When i restart home assistant i can see “climate.bedroom_thermostat” under developer tools → states
It shows the following states :
operation_mode: idle
current_temperature: null
max_temp: 29
friendly_name: Bedroom Thermostat
temperature: 24
min_temp: 22.9
unit_of_measurement: °C
Can anyone help my as to why current_temperature: null?
My relay isn’t triggering and I believe this is probably the reason why. I have a scout around the forums and no one else seems to have run into this. The one topic I did find with the same issue no one had replied to it.
Thanks
Ross