I succesfully managed to setup automations to turn my heatpump/AC on/off, and choosing the operation mode from Telegram.
All I need to add now is the possibility to adjust the temperature setpoint (the predefined sane default might not suit my wishes…). Same would in theory apply for the fan direction and speed values - but I hardly ever change those from auto, so not a real issue there
The value is defined by an input_number like this:
input_number:
actemp:
name: Temperatur
initial: 20
min: 16
max: 30
step: 1
icon: mdi:thermometer
Can anyone direct me how to create the needed automation for adjusting the setpoint?
I really don’t want to create individual configurations for all thinkable temperatures, but would like to be able to enter it directly from Telegram.
My automations.yaml look like this at the moment:
- id: actelegram
alias: Telegram - Control AC
hide_entity: true
trigger:
- event_data:
data: /ac
event_type: telegram_callback
platform: event
action:
- service: notify.telegram
data:
message: 'On / Off: {{ states.input_boolean.aconoff.state }}
Funktion: {{ states.input_select.acmodus.state }}
Temperatur: {{ states.input_number.actemp.state }}°C
Blæser: {{ states.input_number.acfan.state }} - 0 = Auto
V-retning: {{ states.input_number.acdirection.state }} - 0 = Auto
'
data:
inline_keyboard:
- On/Off:/aconoff, Funktion:/acfunction, Temperatur:/actemperature, Start:/start
- id: aconoff
alias: Telegram - AC On/Off
hide_entity: true
trigger:
- event_data:
data: /aconoff
event_type: telegram_callback
platform: event
action:
- service: homeassistant.toggle
entity_id: input_boolean.aconoff
- delay: 00:00:01
- service: notify.telegram
data:
message: 'On / Off: {{ states.input_boolean.aconoff.state }}
'
data:
inline_keyboard:
- On/Off:/aconoff, Funktion:/acfunction, Temperatur:/actemperature, Start:/start
- id: acfunction
alias: Telegram - Control AC Function
hide_entity: true
trigger:
- event_data:
data: /acfunction
event_type: telegram_callback
platform: event
action:
- service: notify.telegram
data:
message: 'Vælg funktion. Aktuel funktion: {{ states.input_select.acmodus.state }}
'
data:
inline_keyboard:
- Auto:/acfunctionauto, Køl:/acfunctioncool, Varme:/acfunctionheat, Affugtning:/acfunctiondry, Vifte:/acfuntionfan, Start:/start
- id: acfunctionauto
alias: Telegram - Control AC Function Auto
hide_entity: true
trigger:
- event_data:
data: /acfunctionauto
event_type: telegram_callback
platform: event
action:
- service: input_select.select_option
data:
entity_id: input_select.acmodus
option: Auto
- delay: 00:00:01
- service: notify.telegram
data:
message: 'Ny funktion: {{ states.input_select.acmodus.state }}
'
data:
inline_keyboard:
- On/Off:/aconoff, Funktion:/acfunction, Temperatur:/actemperature, Start:/start
- id: acfunctioncool
alias: Telegram - Control AC Function Køl
hide_entity: true
trigger:
- event_data:
data: /acfunctioncool
event_type: telegram_callback
platform: event
action:
- service: input_select.select_option
data:
entity_id: input_select.acmodus
option: Køling
- delay: 00:00:01
- service: notify.telegram
data:
message: 'Ny funktion: {{ states.input_select.acmodus.state }}
'
data:
inline_keyboard:
- On/Off:/aconoff, Funktion:/acfunction, Temperatur:/actemperature, Start:/start
- id: acfunctionheat
alias: Telegram - Control AC Function Varme
hide_entity: true
trigger:
- event_data:
data: /acfunctionheat
event_type: telegram_callback
platform: event
action:
- service: input_select.select_option
data:
entity_id: input_select.acmodus
option: Varme
- delay: 00:00:01
- service: notify.telegram
data:
message: 'Ny funktion: {{ states.input_select.acmodus.state }}
'
data:
inline_keyboard:
- On/Off:/aconoff, Funktion:/acfunction, Temperatur:/actemperature, Start:/start
- id: acfunctiondry
alias: Telegram - Control AC Function Affugtning
hide_entity: true
trigger:
- event_data:
data: /acfunctiondry
event_type: telegram_callback
platform: event
action:
- service: input_select.select_option
data:
entity_id: input_select.acmodus
option: Affugtning
- delay: 00:00:01
- service: notify.telegram
data:
message: 'Ny funktion: {{ states.input_select.acmodus.state }}
'
data:
inline_keyboard:
- On/Off:/aconoff, Funktion:/acfunction, Temperatur:/actemperature, Start:/start
- id: acfuntionfan
alias: Telegram - Control AC Function Vifte
hide_entity: true
trigger:
- event_data:
data: /acfuntionfan
event_type: telegram_callback
platform: event
action:
- service: input_select.select_option
data:
entity_id: input_select.acmodus
option: Vifte
- delay: 00:00:01
- service: notify.telegram
data:
message: 'Ny funktion: {{ states.input_select.acmodus.state }}
'
data:
inline_keyboard:
- On/Off:/aconoff, Funktion:/acfunction, Temperatur:/actemperature, Start:/start