Hello everybody,
I have build some sensors for my garden and had problems updating the sensors with new ESPHome versions. I found out that the API key can not be transmitted as ESPHome seems to have problems extracting the key from the code when the filter “filter_out: nan” is in it. The error in the thread title appears when I click the three dots in ESPHome sensor and select “Show API Key”.
When I comment the “filter_out”-line out everything goes well.
Is this a bug or do I miss something?
Just to test it I used the following code:
esphome:
name: test
friendly_name: test
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "BD7oYgph6lN0iAXuwh22MzvJORVGe+ZGwhR2K6ElwIQ="
ota:
password: "e0eff7a1da9a07a6c11b4e95f345b8f6"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Test Fallback Hotspot"
password: "T7DXMzBrqGDK"
captive_portal:
sensor:
# The actual distance sensor
- platform: ultrasonic
trigger_pin: D1
echo_pin: D2
name: garden_watertank_distance
update_interval: 600s
pulse_time: 50us
filters:
- filter_out: nan
This is a simple ultrasonic sensor configuration, nothing else. Tried it also with other sensors, the problem remains as long as “filter_out: nan” is in the code.
Thanks for any help!