Using the value of input_number as action field?

Suuuper quick question which I am unable to find the answer for it:
I have a input_number variable that contains an integer which is set by another automation (which works). It contains the Temperature required for the leaving water temperature of the heatpump.

I can set this only as an action → device (not service) as such:

          - device_id: 67472ecafa2092a1b9d0ef6f38173dfe
            domain: number
            entity_id: number.temperature_control
            type: set_value
            value: 38

Now this is static for 38. I want the 38 to be whatever input_number.daikin_ufh_lwt is:

          - device_id: 67472ecafa2092a1b9d0ef6f38173dfe
            domain: number
            entity_id: number.temperature_control
            type: set_value
            data_template:
              value: >-
              {{ states("input_number.daikin_ufh_lwt") | float }}

yields Message malformed: extra keys not allowed @ data['data_template'], while doing a

          - device_id: 67472ecafa2092a1b9d0ef6f38173dfe
            domain: number
            entity_id: number.temperature_control
            type: set_value
            value: >
              {{ states("input_number.daikin_ufh_lwt") | float }}

yields a Message malformed: expected float for dictionary value @ data['value']

The heat curve is perfect. I just need to punch that number in… *But How? :slight_smile:

You can’t use templates with device actions. Use a service call instead.

But what service?

  • Water Heater: Set temperature: Lists only my water heater, not the under floor heating (above device)
  • Climate: Set temperature: Lists all my Climate Controls and my AC Units, but also not the under floor heating (above device).

Try clicking the link in my post.

I just wanted to reply. Fixed and thanks!

          - service: number.set_value
            data_template:
              value: "{{ states('input_number.daikin_ufh_lwt') }}"
            target:
              entity_id: number.temperature_control