No, not in the generic thermostat configuration. That does not accept templates.
You can set the target temp with a template in an automation. But…
It seems odd that you would want to set the target temperature to the value of the same temperature sensor you are using in the thermostat. If you do this your thermostat will always be at the target temperature and so will never turn on.
The idea behind this is to let Google Home just say the current temperature of the temp sensor instead of “The temperature is set to 21° and it is 15°”.
When I expose the native temp sensor of HA, Google answers always similar as follows “The sensor is OFF and it is 15°”.
Okay, I create it, but shame on me I think I have not gotten the idea behind it, sorry…
Should I am now be able to combine the template with the generic_thermostat to get a variable target_temp or should I expose the temperature template sensor to GH?
I have already several devices in GH via Nabu Case. Is there a way to expose additional devices like the temperature template sensor?
I have tried this:
But this would end up in the result that all previous devices would no longer be exposed to GH, but only the one from the example.
OFFTOPIC:
As I said it is just a workaround for this annoying "…is off" verbiage, what I get at the moment. Hopefully Nabu Casa will handle this somehow. Maybe the pimatic dev could help in this regard, because he got it to work with temp and humidity exposed a thermostat in GH via Nora.
The termostat shows 10° because GH is not able to show lower target temps. Internally the target temp is 7°, so GH answers just: “The outside temperature is 7°”
if you don’t have a configuration, the sensor should just appear but you have to restart home assistant.
Adding that configuration only exposes that single sensor. So add the others. Either way, you shouldn’t have to do anything other than restart without that configuration and it should be exposed to google home.
Maybe its better not to look for a workaround, but for a solution for the problem itself.
My initial problem is at the end that GH answered for every exposed temp or humidity sensor that it is off + the measured temperature. Like this:
“The temperature is set to 21° and it is 15°” <<< this was wrong “The sensor is off and it is 15°”
I just like to hear the measured value of the temperature.
As I understood this is a known issue. Who is the right address to fix this, the Nabu Casa guys?
It’s not home asssistant that’s the problem, that’s what Google home announces for any thermostat. This is why you need to expose it as a temperature sensor.
input_boolean.dummy_thermostatschaler represents an always on dummy switch.
But… the problem here is now that as long as the “target temp” and the “measure temp” are not equal, GH will answer: “Außentemperatur is set to X° and it is 15°”
When both are the same them I get my expected announcement “Außentemperatur is 15°”
But I don’t like to wait for this moment always
Therefore I had the idea here to make this hack: target_temp: "{{ states('sensor.aqara_tempsensor_aussen') }}"
But as I learned from @tom_l this is not possible. .
Till now I haven’t tried the way via an automation. I will do, but isn’t it to much effort for such a simple thing?
EDIT
This is new to me. I would give it a try. Where I can find infos for this?