From c4f127f6d82582cafe2b0c766072f263bc53d9af Mon Sep 17 00:00:00 2001 From: Tim Meneely Date: Tue, 10 Aug 2021 21:24:51 -0400 Subject: [PATCH] A couple new devices --- sonoff_s31c.yaml | 61 ++++++++++++++++++++++++++++++++++++++++++ treatlife_ss01s_a.yaml | 44 ++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 sonoff_s31c.yaml create mode 100644 treatlife_ss01s_a.yaml diff --git a/sonoff_s31c.yaml b/sonoff_s31c.yaml new file mode 100644 index 0000000..302d784 --- /dev/null +++ b/sonoff_s31c.yaml @@ -0,0 +1,61 @@ +substitutions: + device_name: sonoff_s31c + device_ip: 192.168.87.73 + +esphome: + name: ${device_name} + platform: ESP8266 + board: esp01_1m + # platformio_options: + # upload_speed: 115200 #baud, tagging this so grep will find it later + +<<: !include standard_wifi.yaml + +logger: + baud_rate: 0 # (UART logging interferes with cse7766) + +api: + # reboot_timeout: 15min + +ota: + +# Device Specific Config + +uart: + rx_pin: RX + baud_rate: 4800 + +binary_sensor: + - platform: gpio + pin: + number: GPIO0 + mode: INPUT_PULLUP + inverted: True + name: ${device_name}_button + on_press: + - switch.toggle: relay + - platform: status + name: ${device_name}_status + +sensor: + - platform: wifi_signal + name: ${device_name}_wifi + update_interval: 60s + - platform: cse7766 + current: + name: ${device_name}_current + accuracy_decimals: 1 + voltage: + name: ${device_name}_voltage + accuracy_decimals: 1 + power: + name: ${device_name}_power + accuracy_decimals: 1 +switch: + - platform: gpio + name: ${device_name}_relay + pin: GPIO12 + id: relay + +status_led: + pin: GPIO13 diff --git a/treatlife_ss01s_a.yaml b/treatlife_ss01s_a.yaml new file mode 100644 index 0000000..46761cc --- /dev/null +++ b/treatlife_ss01s_a.yaml @@ -0,0 +1,44 @@ +substitutions: + device_name: treatlife_ss01s_a + device_ip: 192.168.87.76 + +esphome: + name: ${device_name} + platform: ESP8266 + board: esp01_1m + # platformio_options: + # upload_speed: 115200 #baud, tagging this so grep will find it later + +<<: !include standard_wifi.yaml + +logger: + baud_rate: 0 # (UART logging interferes with cse7766) + +api: + # reboot_timeout: 15min + +ota: + +# Device Specific Config + +switch: + - platform: gpio + id: "relay" + name: "light" + pin: 12 + +output: + - platform: esp8266_pwm + id: status_led + pin: + number: GPIO4 + inverted: True + +binary_sensor: + - platform: gpio + name: "button" + pin: + number: 13 + inverted: True + on_press: + - switch.toggle: relay \ No newline at end of file