Hi, I’m newbe in ESPHOME. I try to find in documentation how to use data comming from HA to automatize processes in ESP8266 board, but I don’t get throught I’m triying to ope a switch if a value from HA sensore is below a value. Here’s the yaml I have at this point. Thanks in adevance !
sensor:
- platform: homeassistant
id: distanciaporta
entity_id: sensor.sensor_distancia_2
internal: true
on_value_range:
below: 1
then:
- switch.turn_off: led_rebedor
switch:
- platform: gpio
pin: GPIO3
name: "led"
id: led_rebedor
restore_mode: ALWAYS_ON