#ESPHome Thermostat Set Preset

1 messages · Page 1 of 1 (latest)

raw turret
#

Apologies if this is in the wrong section... I'm not sure where exactly it belongs.

I'm using the Home Assistant climate thermostat and attempting to set a preset thermostat setting.

In home assistant, I have the thermostat working great, I can set modes, temps, and presets using the built-in thermostat.

I'm trying to add custom buttons that can set my presets, as the default thermostat doesn't have custom preset buttons.

I get the error code:

Failed to call service climate/set_preset_mode. must contain at least one of entity_id, device_id, area_id.
#

...

ESPHome Code:


climate:
  - platform: thermostat
    id: fermenter_1_thermostat
    name: "Fermenter 1 Thermostat"
    sensor: fermenter_1_temp
    default_target_temperature_low: 68
    default_target_temperature_high: 70
    min_cooling_off_time: 2s
    min_cooling_run_time: 2s
    min_heating_off_time: 2s
    min_heating_run_time: 2s
    min_idle_time: 2s
    cool_deadband: 0.1
    cool_overrun: 0.1
    heat_deadband: 0.1
    heat_overrun: 0.1
    visual:
      min_temperature: 0
      max_temperature: 38
      temperature_step: 0.1
    cool_action:
      - switch.turn_on: fermenter_1_cool
    heat_action:
      - switch.turn_on: fermenter_1_heat
    idle_action:
      - switch.turn_off: fermenter_1_cool
      - switch.turn_off: fermenter_1_heat
    preset:
      - name: Default
        default_target_temperature_low: 20
        default_target_temperature_high: 21
        mode: auto
      - name: Lager
        default_target_temperature_low: 12.2
        default_target_temperature_high: 13.0
        mode: auto
      - name: Ale
        default_target_temperature_low: 19.8
        default_target_temperature_high: 20.2
        mode: auto
      - name: Cold Crash
        default_target_temperature_low: 3.3
        default_target_temperature_high: 3.5
        mode: cool
#

...

#

Home Assistant Button:

#

...

#
show_name: true
show_icon: true
type: button
tap_action:
  action: call-service
  service: climate.set_preset_mode
  target:
    area_id: brewery
    entity_id:
      - climate.fermenter_1_thermostat
    device_id: 2095d5fcaebe807c9578639a21f6c763
  data:
    preset_mode: Ale
entity: climate.fermenter_1_thermostat