Skip to content

Instantly share code, notes, and snippets.

@JonahKr
Last active April 18, 2023 08:33
Show Gist options
  • Save JonahKr/48d9a79193798af36909be30c1ccf67c to your computer and use it in GitHub Desktop.
Save JonahKr/48d9a79193798af36909be30c1ccf67c to your computer and use it in GitHub Desktop.
Automation Template for managing Homeassistant Climate entities through events (Rhasspy)
# Manging Rhasspy calls for the climate entity
# A climate entity controls temperature, humidity, or fans, such as A/C systems and humidifiers.
# --> https://developers.home-assistant.io/docs/core/entity/climate/
automation:
#Changing the Temperature
- alias: Rhasspy Set Temperature
description: Set new target temperature
trigger:
- event_data: {}
platform: event
event_type: rhasspy_Set_Temperature
action:
service: climate.set_temperature
data_template:
entity_id: "{{ trigger.event.data.entity | string }}"
temperature: "{{ trigger.event.data.temperature | float }}"
#Changing the Humidity
- alias: Rhasspy Set Humidity
description: Set new target humidity
trigger:
- event_data: {}
platform: event
event_type: rhasspy_Set_Humidity
action:
service: climate.set_humidity
data_template:
entity_id: "{{ trigger.event.data.entity | string }}"
humidity: "{{ trigger.event.data.humidity | float }}"
#Changing the HVAC mode - https://developers.home-assistant.io/docs/core/entity/climate/#hvac-modes
- alias: Rhasspy Set HVAC mode
description: Set new HVAC(Heating, ventilation, and air conditioning) mode
trigger:
- event_data: {}
platform: event
event_type: rhasspy_Set_HVAC_Mode
action:
service: climate.set_hvac_mode
data_template:
entity_id: "{{ trigger.event.data.entity | string }}"
hvac_mode: "{{ trigger.event.data.hvac_mode | string }}"
#Applying a preset - https://developers.home-assistant.io/docs/core/entity/climate/#presets
- alias: Rhasspy Set Preset mode
description: Applying a device preset
trigger:
- event_data: {}
platform: event
event_type: rhasspy_Set_Preset_Mode
action:
service: climate.set_preset_mode
data_template:
entity_id: "{{ trigger.event.data.entity | string }}"
preset_mode: "{{ trigger.event.data.preset_mode | string }}"
#Changing the Fan mode - https://developers.home-assistant.io/docs/core/entity/climate/#fan-modes
- alias: Rhasspy Set Fan mode
description: Changing the fan mode
trigger:
- event_data: {}
platform: event
event_type: rhasspy_Set_Fan_Mode
action:
service: climate.set_fan_mode
data_template:
entity_id: "{{ trigger.event.data.entity | string }}"
fan_mode: "{{ trigger.event.data.fan_mode | string }}"
#Changing the Fan Swing mode (vertical/horizontal/both) - https://developers.home-assistant.io/docs/core/entity/climate/#swing-modes
- alias: Rhasspy Set Swing mode
description: Changing the fan swinging motion
trigger:
- event_data: {}
platform: event
event_type: rhasspy_Set_Swing_Mode
action:
service: climate.set_swing_mode
data_template:
entity_id: "{{ trigger.event.data.entity | string }}"
swing_mode: "{{ trigger.event.data.swing_mode | string }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment