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/fullfeature.yaml

165 lines
3.5 KiB

# esphome config file with all features
substitutions:
devicename: ehmtx8266
ledpin: GPIO02
board: d1_mini
loglevel: DEBUG
external_components:
- source:
type: git
url: https://github.com/lubeda/EsphoMaTrix
esphome:
name: $devicename
on_boot:
priority: -100
then:
- ehmtx.text.color:
id: rgb8x32
red: !lambda return 200;
green: !lambda return 100;
blue: !lambda return 50;
- ehmtx.clock.color:
id: rgb8x32
red: !lambda return 150;
green: !lambda return 0;
blue: !lambda return 100;
- ehmtx.today.color:
id: rgb8x32
red: !lambda return 0;
green: !lambda return 100;
blue: !lambda return 0;
- ehmtx.weekday.color:
id: rgb8x32
red: !lambda return 0;
green: !lambda return 0;
blue: !lambda return 100;
- ehmtx.alarm.color:
id: rgb8x32
red: !lambda return 200;
green: !lambda return 150;
blue: !lambda return 30;
web_server:
port: 80
esp8266:
board: $board
font:
- file: monobit.ttf
id: ehmtx_font
size: 16
glyphs: |
!?"%()+*=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz€@<>/
logger:
level: $loglevel
api:
services:
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
light:
- platform: neopixelbus
id: ehmtx_light
type: GRB
variant: WS2812
pin: $ledpin
num_leds: 256
color_correct: [30%, 30%, 30%]
name: "$devicename Light"
restore_mode: ALWAYS_OFF
on_turn_on:
lambda: |-
id(ehmtx_display)->set_enabled(false);
on_turn_off:
lambda: |-
id(ehmtx_display)->set_enabled(true);
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 (x % 2 == 0) {
return (x * 8) + y;
}
return (x * 8) + (7 - y);
rotation: 0°
update_interval: 16ms
auto_clear_enabled: true
lambda: |-
id(rgb8x32)->tick();
id(rgb8x32)->draw();
sensor:
- platform: uptime
name: Uptime Sensor
ehmtx:
id: rgb8x32
time_component: ehmtx_time
matrix_component: ehmtx_display
clock_time: 5 # seconds
screen_time: 8 # seconds
font_id: ehmtx_font
show_dow: true # day of week
icons2html: true # generate html with con overview
brightness: 80 # percent
time_format: "%H:%M"
date_format: "%d.%m."
week_start_monday: true
xoffset: 1
yoffset: 2
scroll_count: 2
scroll_interval: 80
frame_interval: 192
on_next_screen: # trigger on screen change
lambda: |-
ESP_LOGD("TriggerTest","Iconname: %s",x.c_str());
ESP_LOGI("TriggerTest","Text: %s",y.c_str());
on_next_clock: # trigger on clock display
then:
- ehmtx.clock.color:
id: rgb8x32
red: !lambda return 150;
green: !lambda return rand() % 255;
blue: !lambda return 100;
icons:
- id: xani
lameid: 6075
- id: xsta
lameid: 11236
- url: https://developer.lametric.com/content/apps/icon_thumbs/48720.gif
pingpong: true
id: pipo
frame_duration: 300
- lameid: 5965
frame_duration: 180
id: d180
- lameid: 5965
frame_duration: 80
id: d080
- id: fullscreen
file: sample8x32.gif
- id: samplegif
file: sample8x8.gif