You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
EspHoMaTriXv2/tests/ehtmxv2-template.yaml

160 lines
5.1 KiB

substitutions:
devicename: ehmtxv2
friendly_name: LED Matrix
board: esp32dev
matrix_pin: GPIO32
external_components:
- source:
type: local
path: ../components
components: [ ehmtxv2 ]
esphome:
comment: "EHMTXv2 TEXT from LuBeDa"
name: $devicename
on_boot:
lambda: |-
id(rgb8x32)->show_indicator(255,100,50,2);
id(rgb8x32)->hide_indicator();
id(rgb8x32)->show_alarm(255,0,150,3);
id(rgb8x32)->hide_alarm();
id(rgb8x32)->icon_screen("error","Hallo Text",false,237,20,100,200,150);
id(rgb8x32)->force_screen("error");
id(rgb8x32)->del_screen("error");
id(rgb8x32)->del_screen("error",5);
id(rgb8x32)->rainbow_icon_screen("error","Hallo Text",true,237,20);
id(rgb8x32)->get_status();
id(rgb8x32)->set_display_on();
id(rgb8x32)->set_display_off();
id(rgb8x32)->hold_screen();
id(rgb8x32)->show_gauge(100,0,200);
id(rgb8x32)->hide_gauge();
id(rgb8x32)->set_clock_color(200,100,50);
id(rgb8x32)->set_today_color(200,100,50);
id(rgb8x32)->set_weekday_color(200,100,50);
id(rgb8x32)->full_screen("scale");
id(rgb8x32)->rainbow_icon_screen("error","Oh ein Text");
id(rgb8x32)->text_screen("text",30);
id(rgb8x32)->rainbow_text_screen("text",30);
id(rgb8x32)->clock_screen(30,5);
id(rgb8x32)->rainbow_clock_screen(30,5);
id(rgb8x32)->date_screen(30,5);
id(rgb8x32)->rainbow_date_screen(30,5);
id(rgb8x32)->blank_screen(30,5);
id(rgb8x32)->set_brightness(20);
id(rgb8x32)->bitmap_screen("[31,31,31,63488,63488,63488,31,31,63488,31,31,31,31,31,63488,63488,63488,31,31,63488,63488,63488,63488,31,31,63488,31,31,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,31,63488,31,63488,63488,31,63488,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,31,63488,31,63488,31,63488,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,31,63488,31,63488,31,31,31,63488,31,31,31,31,63488,63488,63488,63488,63488,31,63488,31,31,31,31,63488,63488,63488,63488,63488,31,63488,63488,63488,63488,31,31,63488,31,31,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,63488,31,31,31,63488,31,31,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,31,31,63488,31,31,63488,31,31,31,63488,31,31,31,31,63488,31,31,31,63488,31,63488,63488,63488,63488,31,63488,31,31,31,63488,31,63488,31,31,31,63488,31,63488,31,31,31,63488,31,31]",2,10);
esp32:
board: esp32dev
font:
- file: EHMTXv2.ttf
size: 16
id: default_font
glyphs: |
!?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnÖÄÜöäüopqrstuvwxyz@<>ß§€/
binary_sensor:
- platform: status
name: "$devicename Status"
logger:
level: WARN
api:
sensor:
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
web_server:
light:
- platform: neopixelbus
id: ehmtx_light
type: GRB
internal: true
variant: WS2812
pin: $matrix_pin
num_leds: 256
color_correct: [30%, 30%, 30%]
gamma_correct: 2.0
name: "$devicename Light"
restore_mode: ALWAYS_OFF
time:
- platform: homeassistant
id: ehmtx_time
display:
- platform: addressable_light
id: ehmtx_display
addressable_light_id: ehmtx_light
width: 32
height: 8
pixel_mapper: |-
if (y % 2 == 0) {
return (y * 32) + x;
}
return (y * 32) + (31 - x);
rotation: 0°
update_interval: 16ms
auto_clear_enabled: true
lambda: |-
id(rgb8x32)->tick();
id(rgb8x32)->draw();
ehmtxv2:
id: rgb8x32
icons2html: true
matrix_component: ehmtx_display
time_component: ehmtx_time
time_format: "%H:%M"
date_format: "%d.%m."
show_seconds: false
clock_interval: 90
rtl: true
default_font_id: default_font
special_font_id: default_font
icons:
- id: error
lameid: 40530
- id: scale
file: scale.gif
resize: 32x8
- id: sleep8x32
url: https://user-images.githubusercontent.com/16407309/224850723-634c9b2d-55d9-44f2-9f93-765c0485b090.gif
on_next_screen:
- homeassistant.event:
event: esphome.new_screen
data_template:
iconname: !lambda "return icon.c_str();"
text: !lambda "return text.c_str();"
on_add_screen:
- homeassistant.event:
event: esphome.new_screen
data_template:
iconname: !lambda "return icon.c_str();"
mode: !lambda "return mode;"
on_next_clock:
- homeassistant.event:
event: esphome.new_screen
data_template:
iconname: "Hallo"
on_expired_screen:
- homeassistant.event:
event: esphome.new_screen
data_template:
iconname: !lambda "return icon.c_str();"
text: !lambda "return text.c_str();"
on_icon_error:
- homeassistant.event:
event: esphome.new_screen
data_template:
iconname: !lambda "return icon.c_str();"