updated atom
This commit is contained in:
@@ -1,21 +1,23 @@
|
||||
substitutions:
|
||||
esp_name: "esp8266-p1-meter"
|
||||
|
||||
esphome:
|
||||
name: esp8266-p1-meter
|
||||
name: ${esp_name}
|
||||
comment: ${esp_name}
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
baud_rate: 0
|
||||
level: DEBUG
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "rl7h1lxgaeutnmINJ2mJ3WOWtzUX1AfebHnidDJJdXA="
|
||||
key: !secret esp_P1_api
|
||||
|
||||
ota:
|
||||
password: "122afb0ac402638f10972a8d97256f6f"
|
||||
password: !secret esp_P1_ota
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
@@ -23,47 +25,116 @@ wifi:
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Esp8266-P1-Meter"
|
||||
password: "pKpA1k7rR6K9"
|
||||
ssid: ${esp_name} fallback
|
||||
password: !secret fallback_password
|
||||
|
||||
captive_portal:
|
||||
|
||||
font:
|
||||
# gfonts://family[@weight]
|
||||
- file: "gfonts://Roboto"
|
||||
id: roboto
|
||||
size: 20
|
||||
- file: 'fonts/GothamRnd-Book.ttf'
|
||||
id: font5
|
||||
size: 18
|
||||
- file: 'fonts/GothamRnd-Bold.ttf'
|
||||
id: font_time
|
||||
size: 30
|
||||
glyphs: [' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':']
|
||||
|
||||
uart:
|
||||
rx_pin: GPIO13
|
||||
baud_rate: 115200
|
||||
rx_buffer_size: 1700
|
||||
# uart:
|
||||
# rx_pin: GPIO13
|
||||
# baud_rate: 115200
|
||||
# rx_buffer_size: 1700
|
||||
|
||||
status_led:
|
||||
pin: GPIO2
|
||||
pin:
|
||||
number: GPIO2
|
||||
inverted: true
|
||||
|
||||
dsmr:
|
||||
# dsmr:
|
||||
|
||||
sensor:
|
||||
- platform: dsmr
|
||||
energy_delivered_tariff1:
|
||||
name: Energy Consumed Tariff 1
|
||||
# sensor:
|
||||
# - platform: dsmr
|
||||
# energy_delivered_tariff1:
|
||||
# name: Energy Consumed Tariff 1
|
||||
|
||||
text_sensor:
|
||||
- platform: dsmr
|
||||
identification:
|
||||
name: "DSMR Identification"
|
||||
p1_version:
|
||||
name: "DSMR Version"
|
||||
|
||||
# Example configuration entry
|
||||
i2c:
|
||||
sda: 4
|
||||
scl: 5
|
||||
# text_sensor:
|
||||
# - platform: dsmr
|
||||
# identification:
|
||||
# name: "DSMR Identification"
|
||||
# p1_version:
|
||||
# name: "DSMR Version"
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO4
|
||||
id: lcdbacklight
|
||||
|
||||
switch:
|
||||
- platform: output
|
||||
name: "LCD LED"
|
||||
output: lcdbacklight
|
||||
id: switch_lcdbacklight
|
||||
|
||||
spi:
|
||||
clk_pin: GPIO14
|
||||
mosi_pin: GPIO13
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: esptime
|
||||
|
||||
display:
|
||||
- platform: ssd1306_i2c
|
||||
model: "SSD1306 128x64"
|
||||
address: 0x3C
|
||||
- platform: st7735
|
||||
model: INITR_MINI160X80
|
||||
reset_pin: GPIO16
|
||||
cs_pin: GPIO5
|
||||
dc_pin: GPIO15
|
||||
rotation: 270
|
||||
device_width: 82
|
||||
device_height: 161
|
||||
col_start: 0
|
||||
row_start: 0
|
||||
eight_bit_color: true
|
||||
update_interval: 5s
|
||||
lambda: |-
|
||||
it.print(0, 0, id(roboto), "Hello World!");
|
||||
//it.rectangle(0, 2, 160, 80, id(my_red));
|
||||
it.strftime(2, 2, id(font_time), TextAlign::BASELINE_RIGHT, "%H:%M", id(esptime).now());
|
||||
// this line = the text is centered 80 pixels in from left and 59 pixels down
|
||||
|
||||
|
||||
color:
|
||||
- id: my_red
|
||||
red: 100%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
- id: my_yellow
|
||||
red: 100%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
- id: my_green
|
||||
red: 100%
|
||||
green: 0%
|
||||
blue: 100%
|
||||
- id: my_blue
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 100%
|
||||
- id: my_cyan
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 100%
|
||||
- id: my_magenta
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
- id: my_white
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
- id: my_gray
|
||||
red: 50%
|
||||
green: 50%
|
||||
blue: 50%
|
||||
- id: my_black
|
||||
red: 100%
|
||||
green: 100%
|
||||
blue: 100%
|
||||
Reference in New Issue
Block a user