I have tried to set the target temperature of my heating in a room with assist. It doesn’t work, not with the Home Assistant Cloud or Gemini. (German Intents).
After a while I a found a solution, that worked for me. After the question “list the intent tools names” there was nothing mentioned to set anything of a heating.
But the scripts where in the list. So I created a script to set the target temperature of an area and made the available to the assist. Now it works.
Maybe someone could use this. Important is, to lower the name of the area, because it is case sensitive. I know, it is in german, but you get the idea
alias: Heizungstemperatur ändern
sequence:
- action: climate.set_temperature
data:
temperature: "{{ targettemp }}"
target:
area_id: "{{ raum | lower }}"
description: >-
Über dieses Skript kann die Ziel-Temperatur der Heizung in einem Raum geändert
werden
mode: single
fields:
targettemp:
selector:
text: null
name: targettemp
description: Zieltemperatur der Heizung
required: true
raum:
selector:
text: null
name: Raum
description: Der Raum in dem die Zieltemperatur der Heizung geändert werden soll.
required: true
Hi Sascha, I tried it in my home assistant, but got only errors in the log. Since I am a new user I might need some more advise. I put it in scripts.yaml and replaced “RAUM” with my room name.
This is the error log I get:
Logger: homeassistant.components.script
Quelle: components/script/config.py:147
Integration: Skript (Dokumentation, Probleme)
Erstmals aufgetreten: 11:00:50 (5 Vorkommnisse)
Zuletzt protokolliert: 11:00:50
Script with object id ‘alias’ could not be validated and has been disabled: expected a dictionary. Got ‘Heizungstemperatur ändern’
Script with object id ‘sequence’ could not be validated and has been disabled: expected a dictionary. Got [{‘action’: ‘climate.set_temperature’, ‘data’: {‘temperature’: ‘{{ targettemp }}’}, ‘target’: {‘area_id’: ‘{{ raum | lower }}’}}]
Script with object id ‘description’ could not be validated and has been disabled: expected a dictionary. Got ‘Über dieses Skript kann die Ziel-Temperatur der Heizung in einem Raum geändert werden’
Script with object id ‘mode’ could not be validated and has been disabled: expected a dictionary. Got ‘single’
Script with object id ‘fields’ could not be validated and has been disabled: extra keys not allowed @ data[‘raum’]. Got {‘selector’: {‘text’: None}, ‘name’: ‘Büro’, ‘description’: ‘Der Raum in dem die Zieltemperatur der Heizung geändert werden soll.’, ‘required’: True} extra keys not allowed @ data[‘targettemp’]. Got {‘selector’: {‘text’: None}, ‘name’: ‘targettemp’, ‘description’: ‘Zieltemperatur der Heizung’, ‘required’: True} required key not provided @ data[‘sequence’]. Got None
You should not put this in the YAML- File directly. Use the WebGui, create a Script there, use YAML- Edit and paste it there, that is the supposed way. And don’t change anything, it works without any change.
Das SKript gehört nicht in die YAML- Datei, sondern über die Weboberfläche ein Skript anlegen, dort dann YAML- Editmodus wählen und dort dann das Skript einfügen. Und nichts anpassen, das läuft auch so.
Hey saschabraham, this brings me a step further, since the temperature setting now works in most rooms. But is does not work in rooms which name contains german umlauts like “Büro”. Do you have an idea to solve this last problem? Thanx! Awesome work. MikeRD03
The Problem is, that you have to use the area_id to change the temperature. This is the reason, why the script converts the name to lowercase. Since i mainly use the script for the room Arbeitszimmer there was no problem. So you have to create a replacement to convert Büro to buro or in my case Küche to kuche.
I tried your proposal, but it didn’t work. However it set me on the right path. The replace instruction do not work here, but the regex_replace do. This way all German umlauts could be replaced. Besides that the room ID doesn’t like space characters in the room name. They have to be replaced with a “_”
So the working area_id line for all possible names is: