I guess it didn’t occur to me that it could be that because it works in the logs.
@Demusman Yes, I believe I did. See config below.
@nickrout Sorry, yes. I mean the integration. I did delete the device from the integration and re-add it, no dice.
@stevemann I posted the yaml below.
esphome:
name: nursery_esp
friendly_name: Nursery
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "key"
ota:
password: "key"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Br-Test2 Fallback Hotspot"
password: "key"
captive_portal:
sensor:
- platform: wifi_signal
name: WIFI
binary_sensor:
- platform: gpio
pin:
number: 16
mode:
input: True
pullup: True
name: Help Request
id: help_requested
filters:
- invert:
- delayed_off: 250ms
- platform: gpio
pin:
number: 17
mode:
input: True
pullup: True
name: Night Light Toggle
id: night_light_toggle
filters:
- invert:
- delayed_off: 250ms
- platform: gpio
pin:
number: 18
mode:
input: True
pullup: True
name: Nap Start
id: nap_start
filters:
- invert:
- delayed_off: 250ms
- platform: gpio
pin:
number: 19
mode:
input: True
pullup: True
name: Nap End
id: nap_end
filters:
- invert:
- delayed_off: 250ms
- platform: gpio
pin:
number: 21
mode:
input: True
pullup: True
name: Feed Started
id: feed_started
filters:
- invert:
- delayed_off: 250ms
- platform: gpio
pin:
number: 15
mode:
pullup: True
input: True
id: test_deleteme
filters:
- delayed_off: 250ms
globals:
- id: gR
type: int[17]
restore_value: no
initial_value: '{100, 110, 120, 130, 140, 150, 160, 169, 179, 188, 198, 207, 217, 226, 236, 245, 255}'
- id: gG
type: int[17]
restore_value: no
initial_value: '{0, 0, 0, 0, 0, 0, 23, 42, 62, 81, 105, 125, 140, 155, 185, 200, 220}'
- id: gB
type: int[17]
restore_value: no
initial_value: '{0, 0, 0, 0, 0, 0, 9, 19, 28, 37, 46, 56, 65, 74, 83, 93, 102}'
light:
- platform: neopixelbus
pin: 22
num_leds: 1
type: GRB
variant: ws2812x
name: 'Indicator Light'
id: nursery_indicator_light
restore_mode: ALWAYS_OFF
effects:
- strobe:
- platform: neopixelbus
type: GRB
variant: ws2812x
pin: 33
num_leds: 15
name: 'Nursery Night Light'
id: nursery_night_light
restore_mode: ALWAYS_OFF
effects:
- addressable_lambda:
name: 'Fast Sunrise'
update_interval: 2000ms
lambda: |-
static int i;
static int y;
if (initial_run) {
//y = sizeof(id(gR));
//ESP_LOGD("main", "Y = %d", y);
it.all() = Color(0,0,0);
i = 0;
}
if (i < 17) {
it.all() = Color(id(gR)[i], id(gG)[i], id(gB)[i]);
ESP_LOGD("main", "R = %d - G = %d - B = %d", id(gR)[i], id(gG)[i], id(gB)[i]);
i++;
}
- addressable_lambda:
name: 'Sunrise'
update_interval: 3500ms
lambda: |-
static int i;
static int points = 17;
static int y = it.size() + points;
if (initial_run) {
it.all() = Color(0,0,0);
i = 0;
}
ESP_LOGD("main", "y = %d - i = %d", y, i);
if (i < y) {
for (int x = it.size(); x > 0; x--) {
it[x] = it[x - 1].get();
}
if (i < points) {
it[0] = Color(id(gR)[i], id(gG)[i], id(gB)[i]);
ESP_LOGD("main", "R = %d - G = %d - B = %d", id(gR)[i], id(gG)[i], id(gB)[i]);
i++;
}
}
- addressable_lambda:
name: 'Fade in red'
update_interval: 1000ms
lambda: |-
static int i;
static int x = 5;
static int y = 51;
if (initial_run) {
it.all() = Color(0,0,0);
i = 0;
}
if (i <= y) {
it.all() = Color(i * x, 0, 0);
ESP_LOGD("main", "R = %d", i);
i++;
}
- addressable_flicker:
name: "Flicker"
update_interval: 32ms
intensity: 15%
- addressable_twinkle:
name: "Twinkle"
twinkle_probability: 15%