geoffdavis / esphome-mitsubishiheatpump

ESPHome Climate Component for Mitsubishi Heatpumps using direct serial connection
BSD 2-Clause "Simplified" License
498 stars 143 forks source link

External temperature from HomeAssistant not stable #150

Open jonthekiller opened 1 month ago

jonthekiller commented 1 month ago

I have configured the project on an ESP-01 and I have an issue when using an external temperature sensor from HomeAssistant. The temperature is taken into account but the code seems to rollback to the internal temperature the majority of the time.

I took the temperature from a Philips Hue motion sensor, so I was thinking that the issue was maybe because the value was too old as not refreshed every tick. So I have configured a MQTT to update the value each 2 seconds but the issue stay.

Here is the history of the value retrieved by HomeAssistant from the ESP-01. image

Here is the ESP configuration:

sensor:
  # HomeAssistant sensor to retrieve temperature
  - platform: homeassistant
    name: "Temperature Sensor From Home Assistant"
    entity_id: sensor.temperature_bureau_infra_3
    on_value:
      then:
        - lambda: 'id(hp_infra).set_remote_temperature(x);'

climate:
  - platform: mitsubishi_heatpump
    id: hp_infra
    name: "Clim Infra"
    baud_rate: 2400
    # Optional
    hardware_uart: UART0

    # Optional
    update_interval: 2s
    visual:
      min_temperature: 17
      max_temperature: 28
      temperature_step: 0.5

I can see inside the logs that the configuration seems correct:
image

mrgadget commented 2 days ago

I had the same issue (I think) - mine kept reverting to the internal sensor. Resolved it with a heartbeat setting:

sensor:
  - platform: homeassistant
    name: "Temperature Sensor From Home Assistant"
    entity_id: sensor.house_lounge_weather_temperature
    on_value:
      then:
        - lambda: 'id(hp).set_remote_temperature(x);'
    filters:
      - heartbeat: 15s