New branch to test:
units_switch
This adds in a “Use Fahrenheit” switch. If off, uses 0xC0 for set temp…if on, uses 0xC4.
Also adds Defrost State
Also adds Fan Speed (actual)
Thanks to Cursor for helping fly through the switch add and the two States…
Please test and let me know if this works for you too…
external_components:
- source: github://mdrobnak/esphome@units_switch
components: [midea_xye]
refresh: 0s
# Main settings
climate:
- platform: midea_xye
name: Heatpump
id: heatpump
period: 1s # Optional. Defaults to 1s
timeout: 200ms # Optional. Defaults to 100ms
beeper: false # Optional. Beep on commands.
#default_target_temperature_low: 18°C
#default_target_temperature_high: 24°C
#custom_auto: true
use_fahrenheit: true
defrost:
name: Defrost Active
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: # Optional.
- FAN_ONLY
- HEAT_COOL
- COOL
- HEAT
- DRY
supported_presets: # Optional
- BOOST
outdoor_temperature: # Optional. Outdoor temperature sensor
name: Outside Temp
temperature_2a: # Optional. Inside coil temperature
name: Inside Coil Inlet Temp
temperature_3:
name: Outside Coil Temperature
timer_start: # Optional. On timer duration
name: Timer Start
timer_stop: # Optional. Off timer duration
name: Timer Stop
error_flags: # Optional.
name: Error Flags
fan_speed:
name: Fan Speed
protect_flags: # Optional.
name: Protect Flags
static_pressure:
name: Static Pressure
min_value: 0
sensor:
- platform: homeassistant
entity_id: sensor.thermostat_temperature_source
# entity_id: climate.thermostat
id: variable_thermostat_follow_me
# attribute: current_temperature
name: "Variable Thermostat"
filters:
- throttle: 10s
- heartbeat: 1min
- debounce: 1s
- lambda: return (x - 32.0) * (5.0/9.0);
on_value:
midea_ac.follow_me:
temperature: !lambda "return x;"
- 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
switch:
- platform: midea_xye
midea_ac_id: heatpump
use_fahrenheit:
name: Use Fahrenheit