Compare commits

..

No commits in common. "213469defa6d7c60a2ded73b12302b4e865d7b47" and "b26d01d38716f73d2899263ee3c1a2c51f417174" have entirely different histories.

3 changed files with 47 additions and 162 deletions

View file

@ -1,31 +0,0 @@
time:
- platform: sntp
id: time_sntp
binary_sensor:
- platform: status
name: Status
id: ink_ha_connected
entity_category: diagnostic
sensor:
- platform: uptime
name: Uptime
type: timestamp
time_id: time_sntp
entity_category: diagnostic
- platform: wifi_signal
name: RSSI
update_interval: 60s
entity_category: diagnostic
button:
- platform: restart
icon: mdi:power-cycle
name: ESP Reboot
entity_category: diagnostic
text_sensor:
- platform: wifi_info
ip_address:
name: IP Address

View file

@ -5,14 +5,10 @@ esphome:
esp32: esp32:
board: esp32dev board: esp32dev
framework:
type: esp-idf
packages: !include common/base.yaml
# Enable Home Assistant API # Enable Home Assistant API
api: api:
logger: web_server:
ota: ota:
- platform: esphome - platform: esphome
@ -22,35 +18,15 @@ wifi:
ssid: !secret wifi_ssid ssid: !secret wifi_ssid
password: !secret wifi_password password: !secret wifi_password
event: sensor:
- platform: template - platform: uptime
name: Doorbell name: Uptime
id: doorbell - platform: wifi_signal
device_class: doorbell name: WiFi Signal
event_types: update_interval: 10s
- short
- double
- long
on_event:
then:
- if:
condition:
- switch.is_on: chime_active
then:
- switch.turn_on: relay
- light.turn_on:
id: ring
red: 0
green: 1
blue: 0.7
effect: pulse
- delay: 0.2s
- switch.turn_off: relay
- delay: 5s
- light.turn_off: ring
globals: globals:
- id: should_ring - id: chime
type: bool type: bool
restore_value: True restore_value: True
initial_value: 'true' initial_value: 'true'
@ -66,56 +42,60 @@ switch:
name: Chime Active name: Chime Active
restore_mode: RESTORE_DEFAULT_ON restore_mode: RESTORE_DEFAULT_ON
lambda: |- lambda: |-
return id(should_ring); return id(chime);
turn_on_action: turn_on_action:
- globals.set: - globals.set:
id: should_ring id: chime
value: 'true' value: 'true'
turn_off_action: turn_off_action:
- globals.set: - globals.set:
id: should_ring id: chime
value: 'false' value: 'false'
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
id: button_doorbell id: push_button
internal: True
pin: pin:
number: GPIO15 number: GPIO15
mode: mode:
input: True input: True
pulldown: True pulldown: True
filters: filters:
- delayed_on: 20ms - delayed_on: 50ms
- delayed_off: 20ms - delayed_off: 8s
on_multi_click: on_press:
# Single Short Click then:
- timing: - light.turn_on:
- ON for at most 750ms id: ring
- OFF for at least 300ms red: 0
then: green: 1
- event.trigger: blue: 0.7
id: doorbell effect: pulse
event_type: short - button.press: chime_button
on_release:
then:
- light.turn_off:
id: ring
transition_length: 1s
- platform: status
name: Status
# Double Click: two quick presses button:
- timing: - platform: template
- ON for at most 750ms id: chime_button
- OFF for at most 300ms name: Ring
- ON for at most 750ms icon: mdi:bell
- OFF for at least 300ms on_press:
then: then:
- event.trigger: - if:
id: doorbell condition:
event_type: double - switch.is_on: chime_active
then:
# Long Press only - switch.turn_on: relay
- timing: - delay: 0.3s
- ON for at least 750ms - switch.turn_off: relay
then: - platform: restart
- event.trigger: name: Restart
id: doorbell
event_type: long
output: output:
- platform: ledc - platform: ledc
@ -145,4 +125,4 @@ light:
transition_length: 1s transition_length: 1s
update_interval: 1s update_interval: 1s
default_transition_length: default_transition_length:
milliseconds: 100 milliseconds: 200

View file

@ -1,64 +0,0 @@
esphome:
name: smart-meter
friendly_name: Smart Meter
name_add_mac_suffix: True
packages: !include common/base.yaml
esp8266:
board: d1_mini
logger:
baud_rate: 0
level: INFO
api:
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: Smart Meter Fallback Hotspot
sensor:
- platform: sml
name: Total Energy Consumed
obis_code: 1-0:1.8.0
unit_of_measurement: kWh
accuracy_decimals: 1
device_class: energy
state_class: total_increasing
filters:
- multiply: 0.0001
- platform: sml
name: Current Power
obis_code: 1-0:16.7.0
unit_of_measurement: W
accuracy_decimals: 0
device_class: power
state_class: measurement
filters:
- multiply: 0.01
text_sensor:
- platform: sml
name: Manufacturer
obis_code: 1-0:96.50.1
format: text
# - platform: sml
# name: Serial Number
# obis_code: 1-0:96.1.0
# format: text
uart:
id: uart_main
tx_pin: TX
rx_pin: RX
baud_rate: 9600
sml:
uart_id: uart_main
id: sml_main