ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
376 stars 56 forks source link

Set Preset Mode not working if a temp isn't defined in YAML #237

Open mutasim opened 2 months ago

mutasim commented 2 months ago

As per this comment setting preset mode seemed to be an option.

I've created a smart thermostat but I'm not able to set preset mode.

The following error:

Failed to perform the action climate.set_preset_mode. Entity climate.openplan_smart_thermostat does not support this service.

I'm using HASmartThermostat 2024.6.1 on Hass 2024.9.1

ScratMan commented 2 months ago

Hi, just tested, it works.

action: climate.set_preset_mode
target:
  entity_id: climate.salle_de_bain
data:
  preset_mode: boost

Please ensure the selected preset is enabled (use the smart_thermostat.set_preset_temp action to enable/set/disable the presets temperatures).

mutasim commented 2 months ago

Here's my thermostat with preset temps set (via the service rather than YAML):

Screenshot 2024-09-17 at 07 16 52

Here's where you can see the service not available:

Screenshot 2024-09-17 at 07 17 51 Screenshot 2024-09-17 at 07 19 07

and finally here's my YAML:

climate:
  platform: smart_thermostat
  name: Open Plan Thermostat
  unique_id: openplan_smart_thermostat
  target_sensor: sensor.heating_openplan_temp
  heater: switch.heating_wunda_openplan_switch
  outdoor_sensor: sensor.watford_hertfordshire_temperature
  keep_alive:
    seconds: 60

Thanks!

mutasim commented 2 months ago

Ah so I just hardcoded a temp in YAML and it now it's picked up the presets.

So it appears that if no temps are set in YAML then preset modes won't activate even if temps are set using the available action (?)