Extract number entity from humidifier

Hi!
I have a humidifier and I need to extract only number entity from it to control target humidity.
I believed it would be easy to pass data of target humidity from input_number to humidifier via automations but it didnt work :frowning:
Is it possible and how I am supposed to do this?

alias: Test target hum
description: ""
triggers: []
conditions: []
actions:
  - data:
      humidity: "{{ humidity('humidifier.home_humidifier') }}"
    target:
      entity_id: input_number.test_hum
    action: input_number.set_value
mode: single

While it is certainly possible, what do you intend to do with the number when you have it? You are obviously trying to solve some bigger thing but it does not sound like copying the value to an input number is going to be the best way to get to that.

It seems like you want to control target humidity, getting the setpoint out is the opposite of that.

Anyway, this is a template to get the target humidity:

{{ state_attr('humidifier.home_humidifier', 'humidity') }}

You right, I’ve edited the post :slight_smile:
My old humidifier widget in interface worked differently, it was a kind of Frankenstein built from a few entities: switch on / off entity, current humidity sensor, number entity for target humidity.
So humidifier changed and now it uses humidifier entity but I want to stay with my old widget, so the only problem that I cant control target humidity with number entity…

I had just edited in the template to get at the target_humidity. The docs seem wrong at tis point.

Yeah, thx, but it doesnt work yet :frowning:

Did you test the template in the developer tools?

Also, you seem to have an automation without triggers. So how do you conclude it does not work? Show your full automation.

In developer tools I just got “Result type: string” (even if I triggering one of the triggers) :frowning:


Full code with triggers:

alias: Test target hum
description: ""
triggers:
  - trigger: homeassistant
    event: start
  - trigger: state
    entity_id:
      - humidifier.gidrostat_tsokol
    attribute: humidity
conditions: []
actions:
  - data:
      humidity: "{{ state_attr('humidifier.gidrostat_tsokol', 'humidity') }}"
    target:
      entity_id: input_number.test_hum
    action: input_number.set_value
mode: single