arthurdent75 / SimpleScheduler

An Home Assistant AddOn to schedule entities on/off on weekly base
183 stars 36 forks source link

Climate set fan mode #161

Closed alexelite closed 1 month ago

alexelite commented 2 months ago

Hello,

Is it possible to set the fan mode for a climate entity? I have a TIME>F25 command for a climate entity, but the temperature is set instead. As shown below. Is this the expected behavior, the set fan mode is only valid for fan entities? Thank you in advance for clarifying this.

[2024-06-24 23:10:00] SCHED: Executing ON actions for [test]
[2024-06-24 23:10:00] SCHED: Turning ON [Corp A fata] 
[2024-06-24 23:10:00] DEBUG: climate/turn_on {"entity_id":"climate.corp_a_fata"}
[2024-06-24 23:10:00] DEBUG: climate/set_temperature {"entity_id":"climate.corp_a_fata","temperature":"25"}
[2024-06-24 23:10:00] SCHED: Setting [Corp A fata] temperature to 25°
[2024-06-24 23:10:00] DEBUG: Parsing [TEST - Ventilatie Corp B program dimineata]
[2024-06-24 23:10:00] DEBUG: Parsing [TEST - Ventilatie Corp D program dimineata]
[2024-06-24 23:10:00] DEBUG: Parsing [TEST - Ventilatie Corp D program]
[2024-06-24 23:10:05] DEBUG: Max Retry: 3
[2024-06-24 23:10:05] DEBUG: Starting Queue management - Queue length: 1
[2024-06-24 23:10:05] DEBUG: ID:3b7fded2b2da4275b88cc24a111d6a52 | Entity status:OFF | Queue item:{'entity_id': 'climate.corp_a_fata', 'sched_id': '01263537758e42dab98e51068503b077', 'state': 'on', 'value': '25', 'countdown': 3, 'max_retry': 3}
[2024-06-24 23:10:05] SCHED: Failed to set [Corp A fata]. Retry 1 of 3 
[2024-06-24 23:10:05] SCHED: Turning ON [Corp A fata] 
[2024-06-24 23:10:05] DEBUG: climate/turn_on {"entity_id":"climate.corp_a_fata"}
[2024-06-24 23:10:05] DEBUG: climate/set_temperature {"entity_id":"climate.corp_a_fata","temperature":"25"}
[2024-06-24 23:10:05] SCHED: Setting [Corp A fata] temperature to 25°
[2024-06-24 23:10:05] DEBUG: Finished Queue management - Queue length: 1
arthurdent75 commented 2 months ago

There is a check on the entity type before the parameter letter, so if you put the wrong letter, the addon "understands" the error and uses the correct parameter. In climate the expected parameter (if present) is the temperature, so even if you put an F instead of T, it will consider it as temperature.