mikeatlorne
(Michael Brooks)
November 27, 2023, 10:11pm
1
When I enter this code,
service: rest_command.poolaction
data:
action_code: 5
device_number: 1
value: {{states(‘input_number.pool_heater_setpoint’)}}
it saves as:
service: rest_command.poolaction
data:
action_code: 5
device_number: 1
value:
“[object Object]”: null
I’ve checked the template in the template editor under developer tools and it works fine. Any suggestions?
thankyou
tom_l
November 27, 2023, 10:14pm
2
Please format your pasted code correctly as per section 11 of the forum FAQ.
You need to quote single line templates.
1 Like
mikeatlorne
(Michael Brooks)
November 28, 2023, 12:26am
3
This is what I put into yaml
action:
- service: rest_command.poolaction
data:
action_code: 5
device_number: 1
value: {{states('input_number.pool_heater_setpoint')}}
This is what shows after saving:
action:
- service: rest_command.poolaction
data:
action_code: 5
device_number: 1
value:
"[object Object]": null
tom_l
November 28, 2023, 12:30am
4
As I said:
value: "{{ states('input_number.pool_heater_setpoint') }}"
mikeatlorne
(Michael Brooks)
November 28, 2023, 1:01am
5
that suggestion returns a string rather than a number and as such, is not triggering the correct downstream response. Is there something further that you can suggest?
tom_l
November 28, 2023, 2:01am
6
Fix your downstream response.
mikeatlorne
(Michael Brooks)
November 28, 2023, 2:10am
7
unfortunately, that is not possible. I am feeding instructions to a cloud based intermediary that is then instructing my pool controller what to do. this is the only piece I have not been able to get working… thanks for your help
tom_l
November 28, 2023, 2:18am
8
value: >
{{ states('input_number.pool_heater_setpoint')|float(0) }}
mikeatlorne
(Michael Brooks)
November 28, 2023, 3:09am
9
excellent!. float(0) didn’t work but I changed it to int and success!
with thanks