Hello I have a miflora sensor connected with a esp32 for bluetooth.
Il have create different sensor humidity light level, conductivity and I add a led for inform me directly of the status of the humidity.
But my led are always green. When i try to change it with ho i can change the color of the led
I expect an error in my config ?
Can you check with me ?
esphome:
name: miflora_link
platform: ESP32
board: lolin_d32
wifi:
ssid: "xxx"
password: "xxxx"
manual_ip:
static_ip: xxx
gateway: xxx
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Xiaomi MiFlora Fallback Hotspot"
password: "94IXLBmOvEIA"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
esp32_ble_tracker:
binary_sensor:
- platform: status
name: "MiFlora Status"
sensor:
- platform: xiaomi_hhccjcy01
mac_address: C4:7C:8D:66:48:2F
temperature:
name: "MiFlora Temperature"
moisture:
name: "MiFlora Moisture"
on_value_range:
- below: 20.0
then:
- light.turn_on:
id: led
brightness: 100%
red: 99.61%
green: 51.37%
blue: 2.35%
- above: 60
then:
- light.turn_on:
id: led
brightness: 100%
red: 0%
green: 74.9%
blue: 100%
on_raw_value:
then:
- light.turn_on:
id: led
brightness: 10%
red: 0%
green: 100%
blue: 0%
illuminance:
name: "MiFlora Illuminance"
conductivity:
name: "MiFlora Soil Conductivity"
switch:
- platform: restart
name: "MiFlora Restart"
output:
- platform: ledc
pin: GPIO19
id: redgpio
- platform: ledc
pin: GPIO23
id: greengpio
- platform: ledc
pin: GPIO18
id: bluegpio
light:
- platform: rgb
name: "MiFlora LED"
red: redgpio
green: greengpio
blue: bluegpio
id: led