Having trouble with my generic thermostat

Looked around at other topics and couldn’t find an answer. Just got a DHT22 sensor and hooked it up to my Rpi and input this config for the generic thermostat:

climate:

  • platform: generic_thermostat
    name: Thermostat
    heater: switch.air_conditioner
    target_sensor: sensor.Homesensor_temperature
    min_temp: 75
    max_temp: 83
    ac_mode:
    target_temp: 79
    tolerance: 0.5
    min_cycle_duration:
    seconds: 5

I read that the ac_mode line is boolean based but I wasn’t sure what to put (yes, no, 1,0, etc). At first it was not picking up the current temperature on the web UI, but now it seems to be working. Unfortunately it does not seem to be triggering the air conditioner though, whether it reaches the target temp or max temp. Even when I tried to reduce the target temp in the web UI no dice. It is a command line switch, here is my config:

switch:
platform: command_line
switches:
air_conditioner:
command_on: ssh @* ‘irsend SEND_ONCE /home/pi/lircd.conf KEY_POWER’
command_off: ssh @* ‘irsend SEND_ONCE /home/pi/lircd.conf KEY_POWER’
friendly_name: “Air Conditioner”

and here is the sensor config in case its relevant

sensor:
platform: dht
sensor: DHT22
pin: 7
name: Homesensor
monitored_conditions:
- temperature
- humidity

Switch works great outside of that though. Nothing in the error logs. So I’m hoping that someone can both point out what I might be doing wrong and also tell me what the trigger to turn on the AC is based upon, the target temp or the max temp? Or possibly suggest a better AC component for HA? Thanks for the help :smiling_face:

Welp, apparently

ac_mode: on

did the trick, all working fine now. Thanks though :smiling_face: