Thermostat + IR Remote, some questions

I have a Mitsubishi Heavy ZM A/C controlled with an ESPhome device with IR-beamer. I have simply used Home Assistant to turn the device on when the electricity price is low and then off when it is high. This has worked during the winter.
However, we are now moving into spring and I wanted to work the A/C on a room temperature (another ESPhome device on battery updating every 20 minutes) but I have some issues.

  1. I cannot get the A/C to work in fan only mode, even when trying to set the target_temperature. I see in the device logs that the command is sent to the ESP but no beeps are heard from the A/C

  2. Minimum and maximum for the thermostat in Home Assistant isn’t picked up from the heatpumpir ESPhome climate device. “Note that min_temperature and max_temperature from the base climate component are used to define the range of allowed temperature values in the thermostat component.” (Thermostat Climate Controller — ESPHome)

The thermostat in Home Assistant (2022.3.7 with ESPhome 2022.3.1) looks like this (not obeying min, max or step):


with card config:

type: thermostat
entity: climate.vp_termostat

Any help appreciated!
/Mattias

The ESPhome configuration:

esphome:
  name: esphome-vp-ir

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:

web_server:

ota:
  password: "d20b2e036c339e4ec530aa7bfa2de78d"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Vp-Ir Fallback Hotspot"
    password: "7De5lK5Anvf3"

captive_portal:

# Example configuration entry
remote_transmitter:
  pin: GPIO0
  carrier_duty_percent: 50%

remote_receiver:
  pin: 
    number: GPIO2
    inverted: true
  dump: all
  

# Verkar som om den alltid startar i POWER MODE, vilket väl är OK

sensor:
  - platform: homeassistant
    id: temp
    accuracy_decimals: 1
    entity_id: sensor.vardagsrum_temp

climate:

  - platform: heatpumpir
    id: vp
    sensor: temp
    # Fungerar: mitsubishi_heavy_zj
#    protocol: mitsubishi_heavy_zj
    protocol: mitsubishi_heavy_zm
    # Dubbel-pip på 24°C eller auto fläkt
    visual:
      temperature_step: 1.0 °C
    min_temperature: 18 °C
    max_temperature: 30 °C
    horizontal_default: auto
    vertical_default: auto
    name: "Vardagsrum VP"
    
  - platform: thermostat
    name: "VP Termostat"
    sensor: temp
    default_mode: heat
    default_target_temperature_low: 18 °C
    min_heating_off_time: 900s
    min_heating_run_time: 900s
    min_fan_mode_switching_time: 60s
    min_fanning_run_time: 60s
    min_fanning_off_time: 60s
    min_idle_time: 900s
    fan_only_action:
      - climate.control:
          id: vp
          mode: FAN_ONLY
          fan_mode: MEDIUM
          target_temperature: 18 °C
    fan_mode_on_action: 
      - climate.control:
          id: vp
          mode: FAN_ONLY
          fan_mode: MEDIUM
          target_temperature: 18 °C
    heat_action:
      - climate.control:
          id: vp
          mode: HEAT
    idle_action:
      - climate.control:
          id: vp
          mode: 'OFF'

There is nothing in your pic to say that min and max temp are not being honoured. The set temp is between 18 and 30. However temperature step doesn’t seem to be honoured.

Sorry - too much copy/paste:

From the dev tools, showing 10-30°C range despite the settings in ESPhome.

And both the card and dev tools show a fan mode. What happens when you switch to that.

OK, spent the morning tinkering with this. I cannot grasp the overlap in functions between the two climate components - the irheatpump and the thermostat and why it seems there are no control functions in the irheatpump component although it looks like a thermostat in Home Assistant.

Putting the visual config on the thermostat creates the thermostat OK in Home Assistant. visual config from the heatpumpir component is not picked up, don’t know if this qualifies as a bug or not.

So I ended up making the heatpumpir component internal to get rid of it from Home Assistant. I then created a thermostat exposing that to Home Assistant.
Also found out that the target_temperature needs to be set in heat_action otherwise our A/C won’t enable heating, simply the fan. Experimenting with different temperatures reveals that if set to 23°C or above the A/C will enable boost-mode, will see if I can do a template here so the noisy boost-mode is only enabled when needed.

The high/low electricity price automation now drives the termostat’s setting jumping between 19°C (high price) and 23°C (low price) and works as expected.

I might get around to add better fan-only mode. Cooling is not needed here in Sweden more than on a couple of days so I won’t bother. Enabling the away mode of the A/C would probably be more important.

Posting my revised config here for anyone to comment:

sensor:
  - platform: homeassistant
    id: temp
    accuracy_decimals: 1
    entity_id: sensor.vardagsrum_temp

climate:
  - platform: heatpumpir
    id: vp
    sensor: temp
    internal: true
    protocol: mitsubishi_heavy_zm
    min_temperature: 18 °C
    max_temperature: 30 °C
    horizontal_default: auto
    vertical_default: auto
    name: "Vardagsrum VP"
    
  - platform: thermostat
    visual:
      min_temperature: 18 °C
      max_temperature: 26 °C
      temperature_step: 1 °C
    name: "VP Termostat"
    sensor: temp
    default_mode: heat
    default_target_temperature_low: 18 °C
    min_heating_off_time: 180s
    min_heating_run_time: 180s
    min_idle_time: 180s
    fan_only_action_uses_fan_mode_timer: true
    min_fan_mode_switching_time: 20s
    fan_mode_auto_action:
      - climate.control:
          id: vp
          fan_mode: AUTO
    heat_action:
      - climate.control:
          id: vp
          mode: HEAT
          fan_mode: AUTO
          target_temperature: 25°C
    idle_action:
      - climate.control:
          id: vp
          mode: 'OFF'

Hi, can esphome update the status of the mitsubishi ac if physical remote is used with the heatpumpir?

i am looking for the receiver part as well. dd you manage to get receiving status in HA?

what is the use of receiver in your code? is it updating the status in HA when AC is used from physical remote ?