From aa6bd1dbc6e4912d49c55a5f1e81c9f57e6dff9c Mon Sep 17 00:00:00 2001 From: longranger Date: Sun, 29 Jan 2023 16:25:03 -0800 Subject: [PATCH] Add tree lights. --- _data/.sonoff-s31.yaml | 58 +++++++++++++++++++++++++++++++++++ _data/tree-1-light-olive.yaml | 9 ++++++ _data/tree-1-light-xmas.yaml | 9 ++++++ 3 files changed, 76 insertions(+) create mode 100644 _data/.sonoff-s31.yaml create mode 100644 _data/tree-1-light-olive.yaml create mode 100644 _data/tree-1-light-xmas.yaml diff --git a/_data/.sonoff-s31.yaml b/_data/.sonoff-s31.yaml new file mode 100644 index 0000000..1be4c8a --- /dev/null +++ b/_data/.sonoff-s31.yaml @@ -0,0 +1,58 @@ +logger: + baud_rate: 0 # (UART logging interferes with cse7766) + +# Enable Home Assistant API +api: + +ota: + +# Device Specific Config + +uart: + rx_pin: RX + baud_rate: 4800 + +binary_sensor: + - platform: gpio + pin: + number: GPIO0 + mode: INPUT_PULLUP + inverted: True + name: "${friendly_name} Button" + on_press: + - switch.toggle: relay + - platform: status + name: "${friendly_name} Status" + +sensor: + - platform: wifi_signal + name: "${friendly_name} WiFi Signal" + update_interval: 60s + - platform: cse7766 + current: + name: "${friendly_name} Current" + accuracy_decimals: 1 + voltage: + name: "${friendly_name} Voltage" + accuracy_decimals: 1 + power: + name: "${friendly_name} Power" + accuracy_decimals: 1 + id: my_power + - platform: total_daily_energy + name: "${friendly_name} Daily Energy" + power_id: my_power + +switch: + - platform: gpio + name: "${friendly_name} Relay" + pin: GPIO12 + id: relay + restore_mode: ALWAYS_ON + +time: + - platform: sntp + id: my_time + +status_led: + pin: GPIO13 \ No newline at end of file diff --git a/_data/tree-1-light-olive.yaml b/_data/tree-1-light-olive.yaml new file mode 100644 index 0000000..0899626 --- /dev/null +++ b/_data/tree-1-light-olive.yaml @@ -0,0 +1,9 @@ +substitutions: + device_name: tree-1-light-olive + dn: tree_1_light_olive + friendly_name: 1st Floor olive tree light + +<<: !include .esp8266.yaml +<<: !include .wifi-oss.yaml + +<<: !include .sonoff-s31.yaml \ No newline at end of file diff --git a/_data/tree-1-light-xmas.yaml b/_data/tree-1-light-xmas.yaml new file mode 100644 index 0000000..a065411 --- /dev/null +++ b/_data/tree-1-light-xmas.yaml @@ -0,0 +1,9 @@ +substitutions: + device_name: tree-1-light-xmas + dn: tree_1_light_xmas + friendly_name: 1st Floor X-mas tree light + +<<: !include .esp8266.yaml +<<: !include .wifi-oss.yaml + +<<: !include .sonoff-s31.yaml \ No newline at end of file