Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sonoff POW R2 Washing Machine Sensor Example
esphomeyaml:
name: pow
platform: ESP8266
board: esp01_1m
board_flash_mode: dout
wifi:
ssid: 'Demo'
password: 'Livestream'
# Enable logging
logger:
baud_rate: 0
uart:
rx_pin: RX
baud_rate: 4800
# Enable Home Assistant API
api:
ota:
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Sonoff POW Button"
on_press:
- switch.toggle: fakebutton
- platform: template
name: "Washing Machine Running"
filters:
- delayed_off: 15s
lambda: |-
if (isnan(id(power).state)) {
return {};
} else if (id(power).state > 4) {
// Running
return true;
} else {
// Not running
return false;
}
switch:
- platform: template
name: "Sonoff POW Relay"
optimistic: true
id: fakebutton
turn_on_action:
- switch.turn_on: relay
- light.turn_on: led
turn_off_action:
- switch.turn_off: relay
- light.turn_off: led
- platform: gpio
id: relay
pin: GPIO12
output:
- platform: esp8266_pwm
id: pow_blue_led
pin:
number: GPIO13
inverted: True
light:
- platform: monochromatic
name: "Sonoff POW Blue LED"
output: pow_blue_led
id: led
sensor:
- platform: wifi_signal
name: "Sonoff POW WiFi Signal"
update_interval: 60s
- platform: uptime
name: "Sonoff POW Uptime"
- platform: cse7766
update_interval: 2s
current:
name: "Sonoff POW Current"
voltage:
name: "Sonoff POW Voltage"
power:
name: "Sonoff POW Power"
id: power
on_value_range:
- above: 4.0
then:
- light.turn_on: led
- below: 3.0
then:
- light.turn_off: led
text_sensor:
- platform: version
name: "Sonoff POW ESPHome Version"
@frenck

This comment has been minimized.

Copy link
Owner Author

frenck commented Feb 23, 2019

@joshsinykin this is a bug in ESPHome 1.10, which has been solved in 1.11.
Disabling logging did not actually disable it correctly....

@moshe19803

This comment has been minimized.

Copy link

moshe19803 commented May 21, 2019

how do i get Washing Machine Power Usage - TODAY YESTERDAY ?

@moshe19803

This comment has been minimized.

Copy link

moshe19803 commented May 25, 2019

can i connect tmp sensor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.