swingerman / ha-dual-smart-thermostat

The `dual_smart_thermostat` is an enhaced verion of generic thermostat implemented in Home Assistant. It uses several sensors and dedicated switches connected to a heater and air conditioning under the hood.
https://github.com/swingerman/ha-dual-thermostat
Apache License 2.0
127 stars 20 forks source link

Troubleshooting heat pump cooling #288

Closed dgoodwin430 closed 1 month ago

dgoodwin430 commented 1 month ago

I have not been able to get the heat pump cooling portion to work. I have a 2 stage heat pump with a switching valve. If I remove the heat pump cooling portion everything works as it should but of course I have to control the valve manually.

  - platform: dual_smart_thermostat
    name: HeatPump1
    heater: input_boolean.heatpump1heat
    #cooler: input_boolean.heatpump1cool
    #heat_cool_reverse_entity: switch.heatpump1valve
    secondary_heater: switch.heatpump1stage2
    secondary_heater_timeout: 00:00:30
    secondary_heater_dual_mode: true
    target_sensor: sensor.climate_average_1
    heat_pump_cooling: input_boolean.heatpump1cool
    min_temp: 40
    max_temp: 90
    heat_cool_mode: true # <-required
    #ac_mode: true
    initial_hvac_mode: "heat_cool"
    target_temp: 70
    target_temp_low: 65
    target_temp_high: 75
    cold_tolerance: 0.3
    hot_tolerance: 0
    min_cycle_duration:
      seconds: 5
    keep_alive:
      minutes: 3
    precision: 1.0
swingerman commented 1 month ago

Could you please elaborate on what exactly is not happening when the cooling is enabled?

dgoodwin430 commented 1 month ago

When the temperature is set below the current temperature the "thermostat" does not change the cooling. It just stays idle.

dgoodwin430 commented 1 month ago

Does the yaml configuration at least look correct for this application?

bassdr commented 1 month ago

Something here, I tried many configurations, and even trying to keep it to a minimum "heating", "cooling" and "target_sensor" does not work... It stays idle no matter what temperature I set. Heat or cool...

hvac_modes:
  - heat_cool
  - heat
  - cool
  - "off"
min_temp: 7
max_temp: 35
target_temp_step: 0.5
current_temperature: 25.8
temperature: 21
hvac_action: idle
prev_target_temp_low: 21.5
prev_target_temp_high: 23.5
hvac_action_reason: target_temp_not_reached
friendly_name: HVAC Controller
supported_features: 385
bassdr commented 1 month ago

Nevermind, I had a dumb typo in my configuration.yaml, it works now and I believe I have the same setup as you, so here's a solution (workaround?): Use a small automation to drive the actual relays. To do this, this HACS drives intermediate input_booleans, and I have a small automation to drive the actual "Y", "O/B" and "G" HVAC relays. I could not find another way using the hacs, or it's not documented...

My inputs are called "hvac_heater", "hvac_cooler" and "hvac_fan" (you may not need the last one).

BTW I connected the reverse valve (O/B) and the fan (G) to the same relay to save a relay, as reversing the valve without starting the compressor (Y) has no effect on my setup, and the fan starts with the compressor automatically in heating mode (actually in both modes). Your setup may require another relay for the fan, so you'll have to adjust the automation taking this into account...

This is the configuration:

climate:
  - platform: dual_smart_thermostat
    name: HVAC Controller
    unique_id: hvac_controller
    heater: input_boolean.hvac_heater
    cooler: input_boolean.hvac_cooler
    fan: input_boolean.hvac_fan
    target_temp_step: 0.5
    fan_air_outside: true
    target_temp_low: 21.5
    target_temp_high: 26
    target_sensor: sensor.mainfloorclimatecontrol_temperature
    outside_sensor: sensor.home_realfeel_temperature

This is the automation:

alias: HVAC Standard Interface
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.hvac_heater
      - input_boolean.hvac_cooler
      - input_boolean.hvac_fan
    id: controlled
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.hvac_heater
            state: "on"
        sequence:
          - action: switch.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: switch.hvac_y
          - action: switch.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: switch.hvac_ob
      - conditions:
          - condition: state
            entity_id: input_boolean.hvac_cooler
            state: "on"
        sequence:
          - action: switch.turn_on
            metadata: {}
            data: {}
            target:
              entity_id:
                - switch.hvac_y
                - switch.hvac_ob
      - conditions:
          - condition: state
            entity_id: input_boolean.hvac_fan
            state: "on"
        sequence:
          - action: switch.turn_off
            metadata: {}
            data: {}
            target:
              entity_id: switch.hvac_y
          - action: switch.turn_on
            target:
              entity_id: switch.hvac_ob
            data: {}
    default:
      - action: switch.turn_off
        metadata: {}
        data: {}
        target:
          entity_id:
            - switch.hvac_y
            - switch.hvac_ob
mode: queued
max: 10