Cannot be processed as a number - Warning

I am having this warning pop up on re-start of HA and randomly throughout the day

Error initializing ‘Notification - Water Lawn’ trigger: In ‘numeric_state’ condition: entity automation.eto_accumulation_less_rain state ‘on’ cannot be processed as a number

Here is my config for those two items

service: input_number.set_value
target:
  entity_id: input_number.daily_eto_accumulation
metadata: {}
data:
  value: >
    {{ states('input_number.daily_eto_accumulation') | float(0) -
    states('sensor.edmonton_int_l_aprt_precipitation_yesterday') | float(0) }}

Input number

Sensor

image

It is probably showing as unavailable or unknown or something. Needs an availability clause. I would create a local template sensor with availability, then use that in your automations.

I assume you are referring to the sensor portion of this?

Do u have an automation Notification - Water Lawn ?

I think the error is in that yaml trigger condition. can u post that automation?

Could be the entity and/or the sensors, something is not available at some times when you pull that data in.

Here is the water lawn notification

- id: '1718135372160'
  alias: Eto Accumulation
  description: ''
  trigger:
  - platform: time
    at: '23:59:00'
  condition: []
  action:
  - service: input_number.set_value
    target:
      entity_id: input_number.daily_eto_accumulation
    metadata: {}
    data:
      value: '{{ states(''input_number.daily_eto_accumulation'') | float(0) + states(''sensor.eto_daily_value'')
        | float(0) }}

        '
  mode: single
- id: '1718243803076'
  alias: Eto Accumulation Less Rain
  description: Removes rainfall (from previous day) from Eto Accumulation
  trigger:
  - platform: time
    at: 00:30:00
  condition: []
  action:
  - service: input_number.set_value
    target:
      entity_id: input_number.daily_eto_accumulation
    metadata: {}
    data:
      value: '{{ states(''input_number.daily_eto_accumulation'') | float(0) - states(''sensor.edmonton_int_l_aprt_precipitation_yesterday'')
        | float(0) }}

        '
  mode: single
- id: '1718283214075'
  alias: Notification -  Water Lawn
  description: ''
  trigger:
  - platform: numeric_state
    entity_id:
    - automation.eto_accumulation_less_rain
    above: 15
  condition:
  - condition: time
    after: '17:00:00'
    weekday:
    - mon
    - tue
    - wed
    - thu
    - fri
    - sat
    - sun
  action:
  - service: notify.mobile_app_rk_12_2
    metadata: {}
    data:
      title: Lawn Irrigation Notification
      message: Time to water the lawn, Eto is {{states('input_number.daily_eto_accumulation')}}
  mode: single

Firstly, please post as correctly-formatted YAML not screenshots.

I suspect the problem is your trigger (“When”). The entity in the top box should be the sensor, but I think (can’t tell without the YAML) that you’ve chosen the automation itself, which is either “on” or “off”, neither of which can be compared with 15.

please post automation using the preformattted text option in the forum.
here’s info on how:

without doing the instructions, it makes it hard on us to answer.

since i can’t see your code, i can’t know for certain, but i’m going to guess that “Eto Automation Less Rain” (in your first screenshot’s “When” section) is an automation. and that you intended that to be “Daily Eto Accumulation”

Ok my apologies, I remember how to do this properly (I think), I forgot about the automations in the file editor :frowning:

Not necessary: click the three dots top left and choose Edit as YAML. Then paste that between three backticks before and after:

```
PASTE CODE HERE
```

1 Like

Oh that’s cool, did not know that. I edited my previous post to show what is going on.

check this. i think you have set an automation as a trigger instead of the number entity that you intended.

And there’s the problem, as @armedad and I predicted. Entity should be your input number, not the automation.

Also note that if that number has already reached 15 by 17:00, you won’t get a notification. You might want to add a trigger for 17:00 and a condition that the input number is above 15 to cover that situation.

1 Like

Ok here is the next problem :frowning:

Error initializing ‘websocket_api’ trigger: In ‘numeric_state’ condition: unknown entity input_number.eto_accumulation_less_rain

alias: Eto Accumulation Less Rain
description: Removes rainfall (from previous day) from Eto Accumulation
trigger:
  - platform: time
    at: "00:30:00"
condition: []
action:
  - service: input_number.set_value
    target:
      entity_id: input_number.daily_eto_accumulation
    metadata: {}
    data:
      value: >
        {{ states('input_number.daily_eto_accumulation') | float(0) -
        states('sensor.edmonton_int_l_aprt_precipitation_yesterday') | float(0)
        }}
mode: single

I don’t think that’s the code raising the issue. You appear to have a trigger somewhere that’s missing a daily_ from the entity ID?