Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haier climate integration update #7416

Merged
merged 8 commits into from
Sep 19, 2024
Merged

Conversation

paveldn
Copy link
Contributor

@paveldn paveldn commented Sep 6, 2024

What does this implement/fix?

New features and fixes added for Haier climate integration:

  • Switches added for haier integration for health mode, display, quiet mode (hOn only), and beeper feedback (hOn only)
  • ECO preset removed (replaced by quiet mode switch)
  • beeper setting for climate removed (replaced by beeper switch)
  • Minor bug fixes and improvements

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Related issue or feature (if applicable): fixes

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#4228

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx

Example entry for config.yaml:

# Example config.yaml
climate:
  - platform: haier
    id: haier_ac
    uart_id: uart_haier
    protocol: hOn
    name: Haier AC
    wifi_signal: true
    answer_timeout: 200ms
    visual:
      min_temperature: 16 °C
      max_temperature: 30 °C
      temperature_step:
        target_temperature: 1
        current_temperature: 0.5
    supported_modes:
      - 'OFF'
      - HEAT_COOL
      - COOL
      - HEAT
      - DRY
      - FAN_ONLY
    supported_swing_modes:
      - 'OFF'
      - VERTICAL
      - HORIZONTAL
      - BOTH
    supported_presets:
      - AWAY
      - BOOST
      - SLEEP
    on_alarm_start:
      then:
        - logger.log:
            level: DEBUG
            format: "Alarm activated. Code: %d. Message: \"%s\""
            args: [code, message]
    on_alarm_end:
      then:
        - logger.log:
            level: DEBUG
            format: "Alarm deactivated. Code: %d. Message: \"%s\""
            args: [code, message]

sensor:
  - platform: haier
    haier_id: haier_ac
    outdoor_temperature:
      name: Haier outdoor temperature
    humidity:
      name: Haier Indoor Humidity
    compressor_current:
      name: Haier Compressor Current
    compressor_frequency:
      name: Haier Compressor Frequency
    expansion_valve_open_degree:
      name: Haier Expansion Valve Open Degree
    indoor_coil_temperature:
      name: Haier Indoor Coil Temperature
    outdoor_coil_temperature:
      name: Haier Outdoor Coil Temperature
    outdoor_defrost_temperature:
      name: Haier Outdoor Defrost Temperature
    outdoor_in_air_temperature:
      name: Haier Outdoor In Air Temperature
    outdoor_out_air_temperature:
      name: Haier Outdoor Out Air Temperature
    power:
      name: Haier Power

binary_sensor:
  - platform: haier
    haier_id: haier_ac
    compressor_status:
      name: Haier Outdoor Compressor Status
    defrost_status:
      name: Haier Defrost Status
    four_way_valve_status:
      name: Haier Four Way Valve Status
    indoor_electric_heating_status:
      name: Haier Indoor Electric Heating Status
    indoor_fan_status:
      name: Haier Indoor Fan Status
    outdoor_fan_status:
      name: Haier Outdoor Fan Status

button:
  - platform: haier
    haier_id: haier_ac
    self_cleaning:
      name: Haier start self cleaning
    steri_cleaning:
      name: Haier start 56°C steri-cleaning

text_sensor:
  - platform: haier
    haier_id: haier_ac
    appliance_name:
      name: Haier appliance name
    cleaning_status:
      name: Haier cleaning status
    protocol_version:
      name: Haier protocol version

switch:
  - platform: haier
    haier_id: haier_ac
    beeper:
      name: Haier beeper
    display:
      name: Haier display
    health_mode:
      name: Haier health mode
    quiet_mode:
      name: Haier quiet mode

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.97%. Comparing base (4d8b5ed) to head (421c5eb).
Report is 1308 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7416      +/-   ##
==========================================
+ Coverage   53.70%   53.97%   +0.26%     
==========================================
  Files          50       50              
  Lines        9408     9688     +280     
  Branches     1654     1711      +57     
==========================================
+ Hits         5053     5229     +176     
- Misses       4056     4128      +72     
- Partials      299      331      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@paveldn paveldn force-pushed the haier_update branch 2 times, most recently from f96cb10 to ff4f3ff Compare September 6, 2024 05:50
@esphome
Copy link

esphome bot commented Sep 11, 2024

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@esphome esphome bot marked this pull request as draft September 11, 2024 04:52
@paveldn paveldn marked this pull request as ready for review September 11, 2024 10:19
@esphome esphome bot requested a review from jesserockz September 11, 2024 10:19
@jesserockz jesserockz merged commit 446f7e0 into esphome:dev Sep 19, 2024
26 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants