ginkage / MHI-AC-Ctrl-ESPHome

ESPHome integration for MHI-AC-Ctrl project
MIT License
101 stars 35 forks source link

Updated Vanes control logic and other small fixes #62

Closed serrj-sv closed 1 year ago

serrj-sv commented 1 year ago

With this PR I'd like to introduce 3 fixes:

  1. Vanes logic control. ESPHome now offer following options for vanes control OFF, BOTH, VERTICAL and HORIZONTAL. Since we can't control "horizontal" vanes via MHI-AC-Ctrl, I propose following:
    • OFF for 45° vertical vane position (position 3)
    • BOTH for vertical vane SWING
    • VERTICAL for highest position of vertical vane (position 1)
    • HORIZONTAL for lowest position of vertical vane (position 4).

You may ask: what about vane position 2? Well, I tested on my unit and difference between 1 and 2 almost negligible. So I assume 1 and 2 are the same. This way you can control vanes from climate component, without calling a service as it is currently implemented

  1. Fan speeds: I don't like that "quiet" mode comes after "high", so I assigned other values for FAN speeds to make it look more aesthetic on dashboard climate card:
    • AUTO - well, auto
    • LOW - speed 1
    • MEDIUM - speed 2
    • HIGH - speed 3
    • DIFFUSE - speed 4
  1. MHI-AC-Ctrl now allows specify target temperature with 0.5° C steps, so I fixed it in this PR

Bonus: config example for "simple-thermostat" HA Dashboard Card (available via HACS):

type: custom:simple-thermostat
entity: climate.master_bedroom_ac_2
layout:
  step: column
  mode:
    names: true
    icons: true
    headings: false
step_size: '0.5'
control:
  hvac: true
  fan:
    _name: Fan
    _hide_when_off: true
    auto:
      name: Auto
      icon: mdi:fan-auto
    low:
      name: Quiet
      icon: mdi:fan-minus
    medium:
      name: Low
      icon: mdi:fan-speed-1
    high:
      name: Med
      icon: mdi:fan-speed-2
    diffuse:
      name: High
      icon: mdi:fan-speed-3
  swing:
    _name: Vanes
    _hide_when_off: true
    'off':
      name: Default
      icon: mdi:arrow-bottom-left-thin
    both:
      name: Swing
      icon: mdi:swap-vertical
    vertical:
      name: Blow Down
      icon: mdi:arrow-down-thin
    horizontal:
      name: Blow Up
      icon: mdi:arrow-left-thin
sensors:
  - entity: sensor.master_bedroom_t_h_sensor_humidity
    name: Humidity
image