Hi Guys,
I tried to build a simple temperature and humidity-sensor with an integrated status LED to read out the current humidity-state with a single color.
green: ok
yellow: meh
red: too high
In the beginning I noted that the LED keeps the color it had on bootup, which might be problematic for many reasons. Therefore I added a “bootstate color” to indicate that it is not ready yet and to prevent a “frozen” state which might lead to misunderstandings for example.
My Issue:
In my case it does not change back the color it had before blue, if the value_range is the same before the boot.
It seems to look like my value range does not change and therefore it does not trigger the service calls.
If it suddendly changes the range, the other colors are triggered without a problem.
Is there any way to “reset” the value_range or even force the sensor to retrigger?
esphome:
name: esp-temp-humidity
friendly_name: esp_temp_humidity
on_boot:
priority: 550
then:
- light.turn_on:
id: humidity_led_state
brightness: 40%
red: 0%
green: 0%
blue: 100%
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "---"
ota:
password: "---"
wifi:
ssid: "---"
password: "---"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ""---""
password: "---"
captive_portal:
light:
- platform: rgb
name: "RGB LED"
id: "humidity_led_state"
red: output_red
green: output_green
blue: output_blue
output:
- platform: esp8266_pwm
id: output_red
pin: GPIO14
- platform: esp8266_pwm
id: output_green
pin: GPIO12
- platform: esp8266_pwm
id: output_blue
pin: GPIO13
sensor:
- platform: dht
pin: GPIO16
# model: dht22
temperature:
name: "Multisensor Temperature"
humidity:
name: "Multisensor Humidity"
id: multisensor_humidity
on_value_range:
- below: 55
then:
- light.turn_on:
id: humidity_led_state
brightness: 40%
red: 0%
green: 100%
blue: 0%
- above: 55
then:
- light.turn_on:
id: humidity_led_state
brightness: 40%
red: 100%
green: 100%
blue: 0%
- above: 60
then:
- light.turn_on:
id: humidity_led_state
brightness: 40%
red: 100%
green: 0%
blue: 0%
update_interval: 10s
I couldnt find anything else in the docs.
I also searched for threads but noone seems so have this issue at all.
Thanks.