I’ve seen a lot of post, but few real answers and none that solve my problem.
Anyway, passing allong variable seems not to work… but it’s almost exactly what is shown on home_ass.io
So I endud up using the dev tools, made the script as shown, triggered it in place…no joy.
I was expection variable1 to be passed as title of the notification, 2 as the body/message.
I tried using the script.turn_on and the script.test_variables routes, in which case I get straight errors.
The script I logged above was my end of the line, the idea was to use a HA example to proof it would work, it didn’t.
Below is what I need.
alias: Verhoog Temperatuur
sequence:
- service: climate.set_temperature
data:
temperature: "{{sensor}}"
target:
entity_id: "{{entity_id}}"
mode: single
icon: mdi:arrow-up-bold
Logger: homeassistant.components.script.stel_temperatuur_in
Source: helpers/script.py:410
Integration: Script (documentation, issues)
First occurred: 21:46:55 (45 occurrences)
Last logged: 22:44:40
Stel Temperatuur In: Error executing script. Error for call_service at pos 1: Template rendered invalid entity IDs:
Stel Temperatuur In: Error executing script. Invalid data for call_service at pos 1: expected float for dictionary value @ data['temperature']
Also tried switching the ’ and " around as that will sometimes help.
Sorry, I missed that you didn’t have a float filter after the states(). The states of entities are always strings, so you need to convert them before performing math operations with them.
Who knew?!
Didn’t realise you can’t template in the frontend…I’m guessing that pertains to the “tap_action” parts? (As I am using a mushroom template…which should be…no?)