zacs / ha-dualmodegeneric

Generic thermostat capable of heating and cooling
68 stars 26 forks source link

How can I get the reverse_cycle to work? #52

Closed Legendhidde closed 4 months ago

Legendhidde commented 1 year ago

Hi, I've been trying to get this thermostat to work for a while now with my Mitsubishi aircon. I can cool, heat, dry and fan with it but I was wondering what I need to set as cooler, heater, dryer and fan in the configuration.yaml.

Simply adding the airconditioning entity ID doesn't seem like it would work as my aircon works with a command like:

- service: climate.set_hvac_mode
            data:
              hvac_mode: heat
            target:
              device_id: 0d36b2068f1d3e9092012e2e

Although I don't think this works properly. What I did to try to solve this was create a couple of switch templates that would call the service and turn the airconditioner to heat and a preset temperature. Although this doesn't seem like the best solution either as I'm sure smart people have already gotten this to work without those switching templates. It would also be preferable to set the temperature of the airconditioner based on the temperature set in the thermostat. So that when the aircon turns on while the thermostat is set to 18 then the temperature set on the airco should also be 18.

      aircocool:
        value_template: "{{ is_state('climate.airco_living_room', 'cool') }}"
        turn_on:
          - service: climate.set_temperature
            data:
             hvac_mode: cool
             temperature: 25
            target:
             device_id: 0d36b2068f1d3e9092012e2ed73cd0ff
        turn_off:
          - service: climate.turn_off
            data: {}
            target:
             device_id: 0d36b2068f1d3e9092012e2ed73cd0ff
david-kalbermatten commented 4 months ago

Yes and no, this integration is a simpler approach, it is supposed to run the AC or Heater on full blast and then use a sensor to turn it off again. We may argue over how elegant this is, but this is how the generic thermostat from home assistant works too.

Have switches represent the state of the generic thermostat and then have automations be triggered. Or you use template_switches like you did.

This is by design as it allows for the broadest support of use-cases (yes, it does make some use-cases a bit harder to implement)