Opentherm gateway set outside temperature with template

My goal is to set the outside temperature on my Nodoshop OTGW. I can call the service (
opentherm_gw.set_outside_temperature) and manually set a value for the outside temperature in the sevices tab like this:

gateway_id: 1
temperature: 10.5

But when I try to use a template that fetches the outside temperature from the weather integration I get the error “expected float value for dictionary value @ data[‘temperature’]”:

gateway_id: 1
temperature: {{ states('sensor.papendrecht_temperature') | float }}

It feels like it’s something small I’m missing…

Hello Bob,

try:

service: opentherm_gw.set_outside_temperature
data:
  gateway_id: 1
  temperature: '{{ states(''sensor.papendrecht_temperature'')|float }}'
1 Like