I’m trying to use a input value from Home Assistant as the values in on_value_range.
sensor:
- platform: homeassistant
name: "volym_grans"
entity_id: input_number.volym_grans
id: volym_grans
- platform: adc
pin: A0
name: "Sound"
update_interval: 0.1s
internal: true
on_value_range:
- above: id(volym_grans).state
then:
- switch.turn_on: snd
- below: id(volym_grans).state- 0.01
then:
- switch.turn_off: snd
In Home Assistant input_number.volym_grans is:
input_number:
volym_grans:
name: volym_grans
min: 0.56
max: 1
step: 0.01
But in ESPHome I get an error on - above: id(volym_grans).state
that it expects float value.
I don’t understand, why would it not be float? The value is float in Home Assistant and sensors in ESPHome are (or can be) float, so why is it converted to something else?
What can I do to fix this?