98 lines
2.4 KiB
YAML
98 lines
2.4 KiB
YAML
substitutions:
|
|
name: "air-conditioner"
|
|
friendly_name: "Air Conditioner"
|
|
|
|
esphome:
|
|
name: "${name}"
|
|
friendly_name: "${friendly_name}"
|
|
platform: ESP8266
|
|
board: esp12e
|
|
name_add_mac_suffix: true
|
|
|
|
wifi:
|
|
ssid: !secret wifi_ssid
|
|
password: !secret wifi_password
|
|
ap:
|
|
ssid: ${friendly_name} Fallback
|
|
password: !secret fallback_password
|
|
|
|
captive_portal:
|
|
|
|
# Enable logging
|
|
logger:
|
|
level: INFO
|
|
baud_rate: 0
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
ota:
|
|
|
|
uart:
|
|
tx_pin: 1
|
|
rx_pin: 3
|
|
baud_rate: 9600
|
|
|
|
remote_transmitter:
|
|
pin:
|
|
number: GPIO5
|
|
inverted: true
|
|
mode: OUTPUT_OPEN_DRAIN
|
|
carrier_duty_percent: 100%
|
|
|
|
climate:
|
|
- platform: midea
|
|
name: "midea" # Use a unique name.
|
|
period: 1s # Optional
|
|
timeout: 2s # Optional
|
|
num_attempts: 3 # Optional
|
|
autoconf: true # Autoconfigure most options.
|
|
beeper: false # Beep on commands.
|
|
visual: # Optional. Example of visual settings override.
|
|
min_temperature: 17 °C # min: 17
|
|
max_temperature: 30 °C # max: 30
|
|
temperature_step: 0.5 °C # min: 0.5
|
|
supported_modes: # All capabilities in this section detected by autoconf.
|
|
- FAN_ONLY # This capability is always used.
|
|
# - HEAT_COOL
|
|
- COOL
|
|
# - HEAT
|
|
- DRY
|
|
supported_presets: # All capabilities in this section detected by autoconf.
|
|
# - ECO
|
|
# - BOOST
|
|
# - SLEEP # This capability is always used.
|
|
# custom_presets: # All capabilities in this section detected by autoconf.
|
|
# - FREEZE_PROTECTION
|
|
supported_swing_modes:
|
|
- VERTICAL # This capability is always used.
|
|
|
|
sensor:
|
|
- platform: homeassistant
|
|
id: external_temp
|
|
entity_id: sensor.temperature_humidity_sensor_bb09_temperature # Sensor from HASS
|
|
internal: false
|
|
filters:
|
|
- throttle: 5min
|
|
- heartbeat: 1min
|
|
on_value:
|
|
midea_ac.follow_me:
|
|
temperature: !lambda "return float((x - 32.0) * (5.0/9.0));"
|
|
beeper: false
|
|
|
|
switch:
|
|
- platform: template
|
|
name: Beeper
|
|
icon: mdi:volume-source
|
|
optimistic: true
|
|
turn_on_action:
|
|
midea_ac.beeper_on:
|
|
turn_off_action:
|
|
midea_ac.beeper_off:
|
|
|
|
button:
|
|
- platform: template
|
|
name: Display Toggle
|
|
icon: mdi:theme-light-dark
|
|
on_press:
|
|
midea_ac.display_toggle:
|