From 87ba336d88d71a2201e8d4c6292f7f795b7bb9de Mon Sep 17 00:00:00 2001 From: NBSgamesAT Date: Fri, 27 May 2022 08:10:20 +0200 Subject: [PATCH] Added SonoffStecker. Yeah that was like a 5 minute work thing and just pushed that out real quick... --- README.md | 3 +++ sonoffStecker1.yaml | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 sonoffStecker1.yaml diff --git a/README.md b/README.md index ea7551b..a95403f 100644 --- a/README.md +++ b/README.md @@ -65,4 +65,7 @@ MQTT topic `tabletenniscounter/display/number/command` is used to send the score Should state ON be sent without any other attribute, the nbs logo is displayed with a little minus at the end for no particular reason. +# Sonoff Stecker 1 (Sonoff Plug 1) +Is the base implementation of the Sonoff Power switch. Nothings special. Still here just in case someone wants it. + More infos are coming soon. \ No newline at end of file diff --git a/sonoffStecker1.yaml b/sonoffStecker1.yaml new file mode 100644 index 0000000..86592cb --- /dev/null +++ b/sonoffStecker1.yaml @@ -0,0 +1,41 @@ +esphome: + name: sonoffstecker1 + platform: ESP8266 + board: sonoff_basic + +# Enable logging +logger: + +# Enable Home Assistant API +api: + password: !secret ss1password + encryption: + key: !secret ss1password + + + +ota: + password: !secret ss1password + +wifi: + ssid: !secret wifi_ssid + password: !secret wifi_password + fast_connect: true + +switch: + - platform: gpio + name: "Sonoff Stecker 1" + pin: GPIO12 + id: relay + +binary_sensor: + - platform: gpio + pin: + number: GPIO0 + mode: + input: true + pullup: true + inverted: true + id: "sonoff_power" + on_press: + - switch.toggle: relay