I don’t see the entities in HomeAssistant, the buttons are not toggling my devices, nor are they following the state. I tried removing Improv, as others suggested on the forum, but it didn’t seem to affect this behavior
# This file was generated by the LocalBytes LocalDeck Configurator
substitutions:
name: esphome-web-f8f968
friendly_name: LocalDeck-f8f968
esphome:
name: ${name}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
platformio_options:
board_build.flash_mode: dio
on_boot:
- light.turn_on:
id: ledstrip
brightness: 25%
effect: Addressable Rainbow
- delay: 8s
- light.turn_off:
id: ledstrip
esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
sdkconfig_options: {}
wifi:
power_save_mode: NONE
ap:
ssid: ${friendly_name}
captive_portal: {}
ota:
- platform: esphome
logger:
logs: {}
api: {}
web_server: {}
output:
- platform: template
# id: improv_status
type: binary
write_action:
- light.control:
id: keypad_button_01_light
state: !lambda return state;
# esp32_improv:
# status_indicator: improv_status
# authorizer: keypad_button_01
# improv_serial: {}
# Anything below this line will be removed when saving.
# To change this, navigate to the LocalBytes LocalDeck Configurator.
# Your changes will be lost!
# Edit: https://blog.mylocalbytes.com/tools/localdeck-configurator?config=eJwVi7EKgzAYhN%2FlZit0EXXu2LG7JPGPhv5NBK%2BgSN7d5IbjPvjuAgNVMOKdnNGXuO%2FD937oejSwfzLFHeOF51Dbpd%2BWokRWWM1UVuBZzhqWla2VebIS5xO5gRorWj3KUXx8ZCdyyQ2sEicj
text_sensor:
- platform: wifi_info
mac_address:
id: wifi_info_mac_address
- platform: homeassistant
id: keypad_button_19_hass
entity_id: light.bed_bendy
on_value:
- light.control:
id: keypad_button_19_light
state: !lambda return x == "on";
- platform: homeassistant
id: keypad_button_19_hass_color
entity_id: light.bed_bendy
attribute: rgb_color
on_value:
- script.execute:
id: set_led_rgb
color: !lambda return x;
entity: button_19_light
light:
- platform: esp32_rmt_led_strip
name: Ledstrip
id: ledstrip
rgb_order: GRB
pin: GPIO8
rmt_channel: 0
num_leds: 24
chipset: SK6812
restore_mode: RESTORE_AND_OFF
effects:
- addressable_rainbow:
name: Addressable Rainbow
- platform: partition
id: keypad_button_01_light
name: Button 01 Light
internal: false
segments:
- id: ledstrip
from: 0
to: 0
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_02_light
name: Button 02 Light
internal: false
segments:
- id: ledstrip
from: 1
to: 1
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_03_light
name: Button 03 Light
internal: false
segments:
- id: ledstrip
from: 2
to: 2
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_04_light
name: Button 04 Light
internal: false
segments:
- id: ledstrip
from: 3
to: 3
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_05_light
name: Button 05 Light
internal: false
segments:
- id: ledstrip
from: 4
to: 4
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_06_light
name: Button 06 Light
internal: false
segments:
- id: ledstrip
from: 5
to: 5
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_07_light
name: Button 07 Light
internal: false
segments:
- id: ledstrip
from: 6
to: 6
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_08_light
name: Button 08 Light
internal: false
segments:
- id: ledstrip
from: 7
to: 7
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_09_light
name: Button 09 Light
internal: false
segments:
- id: ledstrip
from: 8
to: 8
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_10_light
name: Button 10 Light
internal: false
segments:
- id: ledstrip
from: 9
to: 9
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_11_light
name: Button 11 Light
internal: false
segments:
- id: ledstrip
from: 10
to: 10
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_12_light
name: Button 12 Light
internal: false
segments:
- id: ledstrip
from: 11
to: 11
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_13_light
name: Button 13 Light
internal: false
segments:
- id: ledstrip
from: 12
to: 12
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_14_light
name: Button 14 Light
internal: false
segments:
- id: ledstrip
from: 13
to: 13
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_15_light
name: Button 15 Light
internal: false
segments:
- id: ledstrip
from: 14
to: 14
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_16_light
name: Button 16 Light
internal: false
segments:
- id: ledstrip
from: 15
to: 15
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_17_light
name: Button 17 Light
internal: false
segments:
- id: ledstrip
from: 16
to: 16
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_18_light
name: Button 18 Light
internal: false
segments:
- id: ledstrip
from: 17
to: 17
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_19_light
name: Button 19 Light
internal: false
segments:
- id: ledstrip
from: 18
to: 18
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_20_light
name: Button 20 Light
internal: false
segments:
- id: ledstrip
from: 19
to: 19
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_21_light
name: Button 21 Light
internal: false
segments:
- id: ledstrip
from: 20
to: 20
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_22_light
name: Button 22 Light
internal: false
segments:
- id: ledstrip
from: 21
to: 21
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_23_light
name: Button 23 Light
internal: false
segments:
- id: ledstrip
from: 22
to: 22
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
- platform: partition
id: keypad_button_24_light
name: Button 24 Light
internal: false
segments:
- id: ledstrip
from: 23
to: 23
effects:
- pulse: {}
- pulse:
name: Fast Pulse
transition_length: 0.5s
update_interval: 0.5s
min_brightness: 0
max_brightness: 1
- pulse:
name: Slow Pulse
update_interval: 2s
- random: {}
- flicker: {}
matrix_keypad:
id: keypad
keys: ABCDEFGHIJKLMNOPQRSTUVWX
rows:
- pin:
number: GPIO21
allow_other_uses: true
- pin:
number: GPIO20
allow_other_uses: true
- pin:
number: GPIO3
allow_other_uses: true
- pin:
number: GPIO7
allow_other_uses: true
columns:
- pin:
number: GPIO0
drive_strength: 5mA
- pin:
number: GPIO1
drive_strength: 5mA
- pin:
number: GPIO10
drive_strength: 5mA
- pin:
number: GPIO4
drive_strength: 5mA
- pin:
number: GPIO5
drive_strength: 5mA
- pin:
number: GPIO6
drive_strength: 5mA
binary_sensor:
- platform: gpio
id: keypad_row_21
pin:
number: GPIO21
allow_other_uses: true
- platform: gpio
id: keypad_row_20
pin:
number: GPIO20
allow_other_uses: true
- platform: gpio
id: keypad_row_03
pin:
number: GPIO3
allow_other_uses: true
- platform: gpio
id: keypad_row_07
pin:
number: GPIO7
allow_other_uses: true
- platform: matrix_keypad
id: keypad_button_01
name: Button 01
internal: false
keypad_id: keypad
key: A
on_press:
- script.execute:
id: blip_light
led_index: 0
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '1'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '1'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_02
name: Button 02
internal: false
keypad_id: keypad
key: B
on_press:
- script.execute:
id: blip_light
led_index: 1
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '2'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '2'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_03
name: Button 03
internal: false
keypad_id: keypad
key: C
on_press:
- script.execute:
id: blip_light
led_index: 2
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '3'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '3'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_04
name: Button 04
internal: false
keypad_id: keypad
key: D
on_press:
- script.execute:
id: blip_light
led_index: 3
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '4'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '4'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_05
name: Button 05
internal: false
keypad_id: keypad
key: E
on_press:
- script.execute:
id: blip_light
led_index: 4
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '5'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '5'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_06
name: Button 06
internal: false
keypad_id: keypad
key: F
on_press:
- script.execute:
id: blip_light
led_index: 5
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '6'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '6'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_07
name: Button 07
internal: false
keypad_id: keypad
key: G
on_press:
- script.execute:
id: blip_light
led_index: 6
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '7'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '7'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_08
name: Button 08
internal: false
keypad_id: keypad
key: H
on_press:
- script.execute:
id: blip_light
led_index: 7
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '8'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '8'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_09
name: Button 09
internal: false
keypad_id: keypad
key: I
on_press:
- script.execute:
id: blip_light
led_index: 8
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '9'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '9'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_10
name: Button 10
internal: false
keypad_id: keypad
key: J
on_press:
- script.execute:
id: blip_light
led_index: 9
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '10'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '10'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_11
name: Button 11
internal: false
keypad_id: keypad
key: K
on_press:
- script.execute:
id: blip_light
led_index: 10
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '11'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '11'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_12
name: Button 12
internal: false
keypad_id: keypad
key: L
on_press:
- script.execute:
id: blip_light
led_index: 11
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '12'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '12'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_13
name: Button 13
internal: false
keypad_id: keypad
key: M
on_press:
- script.execute:
id: blip_light
led_index: 12
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '13'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '13'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_14
name: Button 14
internal: false
keypad_id: keypad
key: 'N'
on_press:
- script.execute:
id: blip_light
led_index: 13
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '14'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '14'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_15
name: Button 15
internal: false
keypad_id: keypad
key: O
on_press:
- script.execute:
id: blip_light
led_index: 14
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '15'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '15'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_16
name: Button 16
internal: false
keypad_id: keypad
key: P
on_press:
- script.execute:
id: blip_light
led_index: 15
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '16'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '16'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_17
name: Button 17
internal: false
keypad_id: keypad
key: Q
on_press:
- script.execute:
id: blip_light
led_index: 16
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '17'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '17'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_18
name: Button 18
internal: false
keypad_id: keypad
key: R
on_press:
- script.execute:
id: blip_light
led_index: 17
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '18'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '18'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_19
name: Button 19
internal: false
keypad_id: keypad
key: S
on_press:
- homeassistant.service:
service: homeassistant.toggle
data:
entity_id: light.bed_bendy
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '19'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: Test
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '19'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: Test
type: double
- platform: matrix_keypad
id: keypad_button_20
name: Button 20
internal: false
keypad_id: keypad
key: T
on_press:
- script.execute:
id: blip_light
led_index: 19
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '20'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '20'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_21
name: Button 21
internal: false
keypad_id: keypad
key: U
on_press:
- script.execute:
id: blip_light
led_index: 20
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '21'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '21'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_22
name: Button 22
internal: false
keypad_id: keypad
key: V
on_press:
- script.execute:
id: blip_light
led_index: 21
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '22'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '22'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_23
name: Button 23
internal: false
keypad_id: keypad
key: W
on_press:
- script.execute:
id: blip_light
led_index: 22
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '23'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '23'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
- platform: matrix_keypad
id: keypad_button_24
name: Button 24
internal: false
keypad_id: keypad
key: X
on_press:
- script.execute:
id: blip_light
led_index: 23
on_click: []
on_double_click: []
on_multi_click:
- timing:
- ON for at most 1s
- OFF for at least 0.5s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '24'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: single
- timing:
- ON for at most 1s
- OFF for at most 0.5s
- ON for at most 1s
then:
- homeassistant.event:
event: esphome.localdeck_button
data:
button: '24'
ieee_address: !lambda return id(wifi_info_mac_address).state;
label: ''
type: double
script:
- id: blip_light
parameters:
led_index: int
mode: parallel
then:
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 100%
green: 100%
blue: 100%
white: 100%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 95%
green: 95%
blue: 95%
white: 95%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 90%
green: 90%
blue: 90%
white: 90%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 85%
green: 85%
blue: 85%
white: 85%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 80%
green: 80%
blue: 80%
white: 80%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 75%
green: 75%
blue: 75%
white: 75%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 70%
green: 70%
blue: 70%
white: 70%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 65%
green: 65%
blue: 65%
white: 65%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 60%
green: 60%
blue: 60%
white: 60%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 55%
green: 55%
blue: 55%
white: 55%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 50%
green: 50%
blue: 50%
white: 50%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 45%
green: 45%
blue: 45%
white: 45%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 40%
green: 40%
blue: 40%
white: 40%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 35%
green: 35%
blue: 35%
white: 35%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 30%
green: 30%
blue: 30%
white: 30%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 25%
green: 25%
blue: 25%
white: 25%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 20%
green: 20%
blue: 20%
white: 20%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 15%
green: 15%
blue: 15%
white: 15%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 10%
green: 10%
blue: 10%
white: 10%
- delay: 25ms
- light.addressable_set:
id: ledstrip
range_from: !lambda return led_index;
range_to: !lambda return led_index;
red: 5%
green: 5%
blue: 5%
white: 5%
- delay: 25ms
- id: set_led_rgb
parameters:
color: string
entity: string
mode: queued
then:
- lambda: |-
ESP_LOGD("set_led_rgb", "Entity %s, Input: %s", entity.c_str(), color.c_str());
if (color.length() < 7) return;
int firstComma = color.find(',');
int secondComma = color.find(',', firstComma + 1);
ESP_LOGV("set_led_rgb", "Commas are: %d, %d", firstComma, secondComma);
float r = stoi(color.substr(1, firstComma));
float g = stoi(color.substr(firstComma + 1, secondComma));
float b = stoi(color.substr(secondComma + 1, color.length() - 1));
ESP_LOGD("set_led_rgb", "%d, %d, %d", r,g,b);
for (auto *light : App.get_lights()){
ESP_LOGV("set_led_rgb", "Checking light %s", light->get_object_id().c_str());
if (light->get_object_id().c_str() == entity){
ESP_LOGD("set_led_rgb", "Setting light %s", light->get_object_id().c_str());
auto call = light->make_call();
call.set_rgb(r/255, g/255, b/255);
call.perform();
}
}
globals:
id: brightness
type: float
initial_value: '1'
restore_value: true
number:
- platform: template
name: Brightness
set_action:
- globals.set:
id: brightness
value: !lambda return x;
max_value: '1'
min_value: '0'
step: '0.01'
lambda: !lambda return id(brightness);
sensor:
- platform: homeassistant
id: keypad_button_19_hass_brightness
entity_id: light.bed_bendy
attribute: brightness
on_value:
- light.control:
id: keypad_button_19_light
brightness: !lambda if (x>=0) return (x/255) * id(brightness); else return 0;