diff options
author | KaufHA <[email protected]> | 2021-12-14 13:35:11 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-12-14 13:35:11 -0700 |
commit | 9e3646714927190a04cffff9010b77ace7dce7c0 (patch) | |
tree | bc2a49473624a73f8e6b97d06923f07d4a56a5ef /kauf-plug.yaml | |
parent | 859d3bfc79548e3993e82e55ce29a6fe698ef2f4 (diff) | |
download | PLF10-9e3646714927190a04cffff9010b77ace7dce7c0.tar.gz PLF10-9e3646714927190a04cffff9010b77ace7dce7c0.zip |
upload v1.8 config filesv1.8
Diffstat (limited to 'kauf-plug.yaml')
-rw-r--r-- | kauf-plug.yaml | 68 |
1 files changed, 42 insertions, 26 deletions
diff --git a/kauf-plug.yaml b/kauf-plug.yaml index 77979b3..0d82744 100644 --- a/kauf-plug.yaml +++ b/kauf-plug.yaml @@ -3,48 +3,49 @@ substitutions: # **** CHANGE FRIENDLY NAME TO SOMETHING UNIQUE PER DEVICE **** friendly_name: Kauf Plug +esp8266: # https://esphome.io/components/esp8266.html + board: esp01_1m + restore_from_flash: true -esphome: - - # **** CHANGE DEVICE NAME TO SOMETHING UNIQUE PER DEVICE **** - name: kauf-plug # **** RENAME YAML FILE TO SAME NAME **** - platform: ESP8266 - board: esp01_1m +esphome: - esp8266_restore_from_flash: true + name: kauf-plug # **** CHANGE DEVICE NAME TO SOMETHING UNIQUE PER DEVICE. RENAME YAML FILE TO SAME NAME. **** + # **** USE DASHES (-) INSTEAD OF SPACES OR UNDERSCORE (_). USE ONLY LOWER CASE LETTERS. **** project: name: "kauf.plf10" - version: "1.7" + version: "1.8" wifi: # **** ENTER WI-FI CREDENTIALS HERE, USING SECRETS.YAML RECOMMENDED **** - ssid: initial_ap2 # !secret my_wifi_ssid - password: asdfasdfasdfasdf # !secret my_wifi_pass - + ssid: initial_ap2 # !secret wifi_ssid + password: asdfasdfasdfasdf # !secret wifi_pass + # Delete the following line to acknowledge that you know that you must enter your home network's # wi-fi credentials in the preceding two fields. If for whatever reason the credentials are typed # in wrong you will have to set up a wifi network with the entered credentials to recover your plug. you_must_enter_wifi_credentials_above: true + # Uncomment below to set a static IP # manual_ip: - # static_ip: !secret kauf_bulb_ip_address + # static_ip: !secret kauf_bulb_rgb_ip_address # gateway: !secret wifi_gateway # subnet: !secret wifi_subnet # dns1: !secret wifi_dns1 - # use_address allows wireless programming through the ESPHome dashboard. - # Set to the plug's IP Address. Remove after programming. - # use_address: 192.168.1.3 + # use_address allows wireless programming through dashboard. + # Set to the bulb's IP Address. Remove after programming. + # use_address: 192.168.86.244 # default is 20, 17 is recommended. output_power: 17 + logger: # Enable logging # baud_rate: 0 # Disable UART logging since TX pad not easily available @@ -56,14 +57,15 @@ ota: debug: # outputs additional debug info when logs start - web_server: # web server allows access to device with a web browser # auth: # optional login details for web interface # username: admin # password: !secret web_server_password -# red led, blink when not connected to wifi or Home Assistant + + +# red led, blink when not connected to WiFi or Home Assistant status_led: pin: number: GPIO0 @@ -75,26 +77,30 @@ binary_sensor: # button input toggles relay and thereby blue led - platform: gpio id: button - name: Kauf Plug Button + name: $friendly_name Button pin: number: GPIO13 mode: INPUT_PULLUP inverted: true + entity_category: '' + on_press: - - if: - condition: # only toggle relay if button is enabled - lambda: 'return (id(select_button).state == "Enabled");' then: - switch.toggle: relay + - if: + condition: # only toggle relay if button is enabled + lambda: 'return (id(select_button).state == "Enabled");' + then: + switch.toggle: relay - # indicates whether plugged-in devices is running based on configurable threshold. + # indicates whether plugged-in device is running based on configurable threshold. - platform: template id: in_use name: ${friendly_name} Device In Use + switch: # blue LED follows relay power state @@ -109,7 +115,8 @@ switch: id: relay name: $friendly_name pin: GPIO4 - + entity_category: '' + # automatically make blue led equal relay state on_turn_on: - if: @@ -121,6 +128,12 @@ switch: on_turn_off: - switch.turn_off: blue_led + - platform: restart + id: restart_switch + name: $friendly_name Restart Firmware + entity_category: diagnostic + disabled_by_default: true + # clock input from Home Assistant used to calculate total daily energy time: @@ -192,6 +205,7 @@ number: # used as a threshold for whether the plugged-in devices is running step: 1 initial_value: 3 id: threshold + entity_category: config optimistic: true # required for changing value from home assistant restore_value: true on_value: @@ -212,7 +226,7 @@ select: # option to disable button - platform: template - name: "Kauf Plug Button" + name: $friendly_name Button id: select_button optimistic: true options: @@ -221,13 +235,15 @@ select: initial_option: Enabled restore_value: true icon: mdi:circle-double + entity_category: config # option to disable blue LED - platform: template - name: "Kauf Plug LED" + name: $friendly_name LED id: select_led optimistic: true + entity_category: config options: - Enabled - Disabled |