Skip to content

Instantly share code, notes, and snippets.

@quazzie
Created April 4, 2019 13:21
Show Gist options
  • Save quazzie/45bcc251cbcaee1ccf8944f3883fea8b to your computer and use it in GitHub Desktop.
Save quazzie/45bcc251cbcaee1ccf8944f3883fea8b to your computer and use it in GitHub Desktop.
pow r2 esphome
uart:
rx_pin: RX
baud_rate: 4800
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: pow_button
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: pow_relay
restore_mode: RESTORE_DEFAULT_OFF
pin: GPIO12
id: relay
- platform: restart
id: restart
output:
- platform: gpio
id: o_blueled
pin:
number: GPIO13
inverted: True
light:
- platform: binary
id: blueled
output: o_blueled
sensor:
- platform: total_daily_energy
name: pow_energy_day
power_id: my_power
unit_of_measurement: kWh
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
- platform: cse7766
update_interval: 10s
current:
name: pow_current
unit_of_measurement: A
voltage:
name: pow_voltage
unit_of_measurement: V
power:
name: pow_power
id: my_power
unit_of_measurement: W
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment