Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
esphome: name: lilka friendly_name: lilka on_boot: priority: 600 then: - output.turn_on: display_power - delay: 100ms esp32: board: esp32-s3-devkitc-1 framework: type: esp-idf logger: api: encryption: key: "Yw3yq8lxsaze+jdggjAwxKpV4GD6gNZptvw4d6OPfOc=" ota: - platform: esphome password: "bb198feb99159fdaefc8092f10039acd" wifi: ssid: !secret wifi_ssid password: !secret wifi_password ap: ssid: "Lilka Fallback Hotspot" password: "hnYImYM4O6I0" captive_portal: # Увімкнення живлення дисплея output: - platform: gpio pin: 46 id: display_power inverted: false # Сенсор батареї sensor: - platform: adc pin: GPIO3 name: "Battery Voltage" id: battery_voltage update_interval: 10s attenuation: 11db filters: - multiply: 2.0 # Якщо є дільник напруги - platform: template name: "Battery Level" id: battery_level unit_of_measurement: "%" accuracy_decimals: 0 update_interval: 10s lambda: |- float voltage = id(battery_voltage).state; // LiPo: 4.2V = 100%, 3.0V = 0% float percent = (voltage - 3.0) / (4.2 - 3.0) * 100.0; if (percent > 100) percent = 100; if (percent < 0) percent = 0; return percent; # SPI шина spi: clk_pin: 18 mosi_pin: 17 # Шрифт font: - file: "gfonts://Roboto" id: default_font size: 20 - file: "gfonts://Roboto" id: small_font size: 14 # Дисплей ST7789V display: - platform: mipi_spi model: ST7789V dc_pin: 15 cs_pin: 7 update_interval: 1s rotation: 0 invert_colors: false color_order: RGB pixel_mode: 16bit dimensions: width: 240 height: 280 offset_width: 0 offset_height: 0 lambda: |- it.fill(Color::BLACK); it.print(120, 140, id(default_font), Color::WHITE, TextAlign::CENTER, "Lilka Works!"); // Відображення заряду батареї if (id(battery_level).has_state()) { it.printf(120, 20, id(small_font), Color::WHITE, TextAlign::CENTER, "Battery: %.0f%%", id(battery_level).state); } // Відображення напруги if (id(battery_voltage).has_state()) { it.printf(120, 40, id(small_font), Color::WHITE, TextAlign::CENTER, "Voltage: %.2fV", id(battery_voltage).state); }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)