(solved) Setting Devices with Template?

Hey folks,

I am using a custom integration, GitHub - tadasdanielius/daikin_altherma: Daikin Altherma custom component for home assistant which manages my Heat Pump. This worked well for years but somewhere in between the last winter and now either Home Assistant or the Integration broke.

Well, not completely. The integration is offering a sensor, number.temperature_control. This is an integer of the temperature in Celsius of the leaving water for the under floor heating.

Last Winter I used this to set this:

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

Which worked. Now, running the same snipped yields in the error

2023-11-21 10:21:32.404 WARNING (MainThread) [homeassistant.helpers.service] Referenced entities number.temperature_control are missing or not currently available

Setting the value in Developer tools changes the value on the Heat Pump. I tripple checked all names and sensors. The number.temperature_control is correct, present and changing the value works.

I noticed when I click in the GUI “Call Service → Input Number: Decrement” I cant seen the above number. I would bet Home Assistant required all numbers now to have some newer format or such.

But this however works in automations:

  - device_id: 67472ecafa2092a1b9d0ef6f38173dfe
    domain: number
    entity_id: bf613f3d082f3735f349239eb068ddc6
    type: set_value
    value: 31

[…]

While writing this article and ensuring all my facts were correct I also verified all my steps. During this I fixed my own problem. I swear it was working before. Backup says It was like this a year ago:

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

Fix:

                  - service: number.set_value
                    data_template:
                      value: "{{ (states('number.temperature_control') | int - 1) }}"
                    target:
                      entity_id: number.temperature_control

I am leaving this here for future generations.