Hi all. Probably I am making a silly mistake as I couldn’t find anyone with the same problem as me.
I am trying to turn a neopixel LED strip on at full brightness and while colour when I press a button in my D1 mini.
I can make the button turn the light on and off, but when I try to set brightness and colour I get errors this error mapping values are not allowed here
when trying to upload the configuration
Here is my ESPHome config:
esphome:
name: kitchen-cabinet-lights
#Board Configuration
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
password: !secret esphome_api_password
ota:
safe_mode: True
password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Kitchen-Cabinet-Lights"
password: "xxxxxxxxxxxxxxxxxx"
captive_portal:
status_led:
pin:
number: GPIO2
inverted: true
binary_sensor:
- platform: gpio
pin:
number: GPIO4
inverted: true
mode:
input: true
pullup: true
name: "Power"
on_press:
if:
condition:
- light.is_off: cabinet_light
then:
- light.turn_on: cabinet_light
brightness: 100%
red: 0%
green: 0%
blue: 0%
white: 100%
else:
- light.turn_off: cabinet_light
- platform: gpio
pin:
number: GPIO5
inverted: true
mode:
input: true
pullup: true
name: "Colour"
on_press:
- logger.log: "Colour button pressed"
light:
- platform: neopixelbus
variant: WS2812
pin: GPIO0
num_leds: 30
type: GRBW
name: "Cabinet Light"
id: cabinet_light