How are you importing this into HA?
Can you post the sensor yaml and the automation yaml?
If the number and the units are always passed, it might be as simple as excluding the right two characters.
On a side note, I use an ultrasonic sensor to measure salt tank level and import it via MQTT to home assistant.
id: '1609160142372'
alias: Email When Water Softener Empty
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.hx711_value
above: '26'
below: '37'
condition:
- condition: template
value_template: >-
{{ (as_timestamp(now()) -
as_timestamp(states.automation.email_when_water_softener_empty.last_triggered
| default(0)) | int > 3600)}}
action:
- service: notify.notifier_email_me
data:
message: Water Softener Empty
title: Water Softener Empty
- service: notify.mobile_app_me_iphone
data:
message: Water Softener Empty
title: Water Softener
mode: single
Error:
Logger: homeassistant.components.homeassistant.triggers.numeric_state
Source: components/homeassistant/triggers/numeric_state.py:115
Integration: Home Assistant Core Integration (documentation, issues)
First occurred: 13:47:21 (1 occurrences)
Last logged: 13:47:21
Error initializing 'Email When Water Softener Empty' trigger: In 'numeric_state' condition: entity sensor.hx711_value state 'kg' cannot be processed as a number
Indeed - that’s what I thought. I’ll change my sensor today to take that Unit of Measurement out to see if that makes a difference unless someone has a different idea. Weird.
I was going to say something similar as @tom_l but I saw he was typing so I waited thinking he saw something I didn’t.
I don’t see anything obviously wrong.
For troubleshooting, remove the condition and the above trigger and see if it works.
Do you have a duplicate automation for this?
This ‘should’ not make a difference but you could also type “37.00”
I have had some weird instances if I have a number that changes state and hovers around the trigger value it has issues; so I always put a for: '00:00:10' at a minimum. I most circumstances 10 seconds won’t make any difference.
Make a duplicate automation, turn off the original, make changes to the copy one at a time and see what errors you get.