Input_number in automation above/below fields not working

i’m studing HA automations… i read in this guide

automation:
  trigger:
    platform: numeric_state
    entity_id: sensor.temperature
    # input_number entity id can be specified for above and/or below thresholds
    above: input_number.temperature_threshold_high
    below: input_number.temperature_threshold_low

but when i try this example i get the error

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

is it a bug or something outdated in the guide?!

thanks

More likely you have an outdated homeassistant installation. The docs always refer to the latest available release, and the ability to use input numbers there are part of the most recent release as of yesterday.

i’m using the latest release…

If you’re using 2021.2.0 and you’re still getting this error then you need to create a bug report.

Hang on, where is this code ?

Another observation here is that the code quoted is exactly a lift from the docs, presumably you actually have these two input numbers defined somewhere?

1 Like

ok, thanks @anon43302295. i’m just doing a fresh install to verify the problem in a brand new environment…

@Mutt

automations.yaml

-  alias: 'test atomation'
   trigger:
     - platform: numeric_state
       entity_id: sensor.thermometer_t0000_temperature
       above: input_number.aaa
  action:
    - service: notify.persistent_notification
      data:
         title: 'test title'
         message: 'test message'
  mode: single

entity and helpers have been properly created

(messed up the code above but yaml file is ok…)

Well : -

automation:

Does not live in automation.yaml

And as Marc said. Have you created the two input_numbers ?
Okay

Do you have sensor.temperature ?

And what is messed up.?

Where is the alias or the id ?

@anon43302295: really thank you. reinstalled right now the HA image, put back on the yaml and the automation has been created… gone crazy for a couple of days trying the example.

1 Like

Yeah, I suspect that you were unlucky and downloaded the previous version just after the docs were updated, but just before the new version was available for download.

Not to worry, so long as you’re up and running :slightly_smiling_face: