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
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
Troon
(Troon)
June 17, 2024, 2:23pm
7
Firstly, please post as correctly-formatted YAML not screenshots.
Before we begin…
This forum is not a helpdesk
The people here don’t work for Home Assistant, that’s an open source project. We are volunteering our free time to help others. Not all topics may get an answer, never mind one that helps you solve your problem.
[image]
This also isn’t a general home automation forum, this is a forum for Home Assistant and things related to it. Any question about Home Assistant, and about using things with Home Assistant, is welcome here. We can’t help you with eve…
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:
Spaces at the beginning of the line are critical in yaml, and people trying to help you may want to copy your code so that they can try it out themselves, so please format it correctly when you are posting.
Use the preformatted text tool (</> in the edit post toolbar). If it is not immediately visible, it will be in the cogwheel menu.
[Code_format]
Alternatively you can use three backticks (the key is on the far left, 2nd row on en keyboards) on their own line above and below the code. That i…
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
Troon
(Troon)
June 17, 2024, 2:56pm
10
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.
armedad:
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”
Troon
(Troon)
June 17, 2024, 2:58pm
13
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
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
Troon
(Troon)
June 17, 2024, 4:04pm
15
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?