I recently bought a set of smartlight slwf-01 and I’ve been trying to make some changes to the firmware they run.
They do provide a yaml config, I copy pasted this into a new device on the esphome dashboard but for some reason I keep getting an error for ota
that says:
Failed config
ota: [source /var/lib/esphome/air-conditioner.yaml:61]
expected a dictionary.
- platform: esphome
The specific OTA part looks like this:
ota:
- platform: esphome
which according to ESPHome’s docs is fine.
Does anyone have an idea of what might be wrong?
NOTE: The file compiles if I remove the OTA
section, but I want to keep OTA capabilities
Pasting the full yaml here for reference:
# These substitutions allow the end user to override certain values
substitutions:
name: air-conditioner
friendly_name: "Air Conditioner"
# Additional substitutions could be added here to make it really easy for the user to override defaults.
# I am adding a some for example purposes.
wifi_ap_ssid: "AC-wifi"
wifi_ap_password: "slwf01pro"
visual_min_temperature: "17 °C"
visual_max_temperature: "30 °C"
visual_temperature_step: "0.5 °C"
esphome:
name: "air-conditioner"
# Friendly names are used where appropriate in Home Assistant
friendly_name: "Air Conditioner"
# Automatically add the mac address to the name
# so you can use a single firmware for all devices
name_add_mac_suffix: true
# This will allow for (future) project identification,
# configuration and updates.
project:
name: SMLIGHT.SLWF-01Pro
version: "2.1"
platform: ESP8266
board: esp12e
# This should point to the public location of this yaml file.
#dashboard_import:
# package_import_url: github://smlight-dev/slwf-01pro/slwf-01pro-v2.yaml
# import_full_config: false # or true
wifi:
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${wifi_ap_ssid}"
password: "${wifi_ap_password}"
captive_portal:
# Enable logging
logger:
baud_rate: 0
# Enable Home Assistant API
api:
services:
- service: follow_me
variables:
temperature: float
then:
midea_ac.follow_me:
temperature: !lambda "return temperature;"
beeper: false
ota:
- platform: esphome
uart:
tx_pin: 12
rx_pin: 14
baud_rate: 9600
button:
- platform: factory_reset
id: factory_reset_btn
name: Factory reset
# "Display toggle" button
- platform: template
name: ${friendly_name} Display Toggle
id: midea_display_toggle
icon: mdi:theme-light-dark
on_press:
midea_ac.display_toggle:
# "Swing step" button
- platform: template
name: ${friendly_name} Swing Step
id: midea_swing_step
icon: mdi:tailwind
on_press:
midea_ac.swing_step:
climate:
- platform: midea
name: ${friendly_name} # The value of "friendly_name" will be used here
id: midea_climate
period: 1s # Optional
timeout: 2s # Optional
num_attempts: 3 # Optional
autoconf: false # Autoconfigure most options.
beeper: true # Beep on commands.
visual: # Optional. Example of visual settings override.
min_temperature: "${visual_min_temperature}" # min: 17
max_temperature: "${visual_max_temperature}" # max: 30
temperature_step: "${visual_temperature_step}" # 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
custom_fan_modes:
- SILENT
- TURBO
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.
- HORIZONTAL
- BOTH
outdoor_temperature: # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity).
name: ${friendly_name} Outdoor Temperature
power_usage: # Optional. Power usage sensor (only for devices that support this feature).
name: ${friendly_name} Power Usage
humidity_setpoint: # Optional. Indoor humidity sensor (only for devices that support this feature).
name: ${friendly_name} Indoor Humidity
switch:
- platform: template
name: ${friendly_name} Beeper
id: midea_beeper
icon: mdi:volume-source
restore_mode: RESTORE_DEFAULT_OFF
optimistic: true
turn_on_action:
midea_ac.beeper_on:
turn_off_action:
midea_ac.beeper_off:
# Sensor from HASS for setting up FollowMe temperature
remote_transmitter:
pin: GPIO13 # For slwf-01pro-v2 dongle
carrier_duty_percent: 100% # 50% for IR LED, 100% for direct connect to TSOP IR receiver output.
sensor:
# - platform: homeassistant
# entity_id: ${follow_me_sensor}
# id: follow_me_sensor
# filters:
# - throttle: 10s
# - heartbeat: 2min
# - debounce: 1s
# on_value:
# midea_ac.follow_me:
# temperature: !lambda "return x;"
# beeper: false
- platform: wifi_signal
name: ${friendly_name} Wi-Fi Signal
update_interval: 60s
- platform: uptime
name: "Uptime"
id: uptime_sec
internal: true
- platform: template
name: ${friendly_name} Uptime Days
lambda: |-
return (id(uptime_sec).state/60)/60/24;
icon: mdi:clock-start
unit_of_measurement: days
update_interval: 60s
# "Power toggle" script
script:
- id: on_button_click
then:
midea_ac.power_toggle:
web_server:
port: 80