diff options
author | KaufHA <[email protected]> | 2021-10-18 22:06:12 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-18 22:06:12 -0700 |
commit | f1c7c4b532e6d1c8521a1f27d4a5d84d883b23f0 (patch) | |
tree | 6041fe588f638935b630cc9105f294f5b00306c2 | |
parent | 88558320129d69c5d5a45e509a74320eb745f88b (diff) | |
download | PLF10-f1c7c4b532e6d1c8521a1f27d4a5d84d883b23f0.tar.gz PLF10-f1c7c4b532e6d1c8521a1f27d4a5d84d883b23f0.zip |
1.7 Upload 1
-rw-r--r-- | kauf-plug-factory.yaml | 27 | ||||
-rw-r--r-- | kauf-plug-upgrade.yaml | 27 | ||||
-rw-r--r-- | kauf-plug.bin | bin | 484480 -> 486528 bytes | |||
-rw-r--r-- | kauf-plug.bin.gz | bin | 326019 -> 327363 bytes |
4 files changed, 42 insertions, 12 deletions
diff --git a/kauf-plug-factory.yaml b/kauf-plug-factory.yaml index ef35c6e..03d0235 100644 --- a/kauf-plug-factory.yaml +++ b/kauf-plug-factory.yaml @@ -20,7 +20,7 @@ esphome: project: name: "kauf.plf10" - version: "1.6" + version: "1.7" on_boot: @@ -36,9 +36,6 @@ esphome: then: - logger.log: "------------------->>>>>>>>>>>>>>>>> already has wifi configured, leaving ap timeout cranked" else: # if credentials not loaded or force_ap is set, lower ap timeout to allow saving new credentials - - globals.set: # clear global whether or not wifi ever connects. - id: force_ap - value: 'false' - logger.log: "------------------->>>>>>>>>>>>>>>>> wifi not configured, enabling ap and waiting" # set ap timeout to 15 seconds in milliseconds. @@ -47,7 +44,9 @@ esphome: - wait_until: wifi.connected - logger.log: "------------------->>>>>>>>>>>>>>>>> wifi connected, cranking ap timeout back up" - + - globals.set: # clear global + id: force_ap + value: 'false' # set ap timeout to max 32 bit value in milliseconds. About 3.5 weeks. - lambda: |- wifi_wificomponent->set_ap_timeout(2147483647); @@ -175,7 +174,13 @@ script: - switch.toggle: blue_led - delay: 333ms - script.execute: blink_led - + - id: clear_wifi_script + then: + - lambda: |- + wifi_wificomponent->clear_stored_creds(); + - delay: 2s + - switch.turn_on: restart_switch + switch: @@ -205,6 +210,16 @@ switch: - platform: restart id: restart_switch + + - platform: template + id: clear_wifi_switch + name: Kauf Plug Clear WiFi Credentials + optimistic: true + disabled_by_default: true +# restore_state: no # no is default already per https://esphome.io/components/switch/template.html + on_turn_on: + then: + script.execute: clear_wifi_script # clock input from Home Assistant used to calculate total daily energy diff --git a/kauf-plug-upgrade.yaml b/kauf-plug-upgrade.yaml index ef35c6e..03d0235 100644 --- a/kauf-plug-upgrade.yaml +++ b/kauf-plug-upgrade.yaml @@ -20,7 +20,7 @@ esphome: project: name: "kauf.plf10" - version: "1.6" + version: "1.7" on_boot: @@ -36,9 +36,6 @@ esphome: then: - logger.log: "------------------->>>>>>>>>>>>>>>>> already has wifi configured, leaving ap timeout cranked" else: # if credentials not loaded or force_ap is set, lower ap timeout to allow saving new credentials - - globals.set: # clear global whether or not wifi ever connects. - id: force_ap - value: 'false' - logger.log: "------------------->>>>>>>>>>>>>>>>> wifi not configured, enabling ap and waiting" # set ap timeout to 15 seconds in milliseconds. @@ -47,7 +44,9 @@ esphome: - wait_until: wifi.connected - logger.log: "------------------->>>>>>>>>>>>>>>>> wifi connected, cranking ap timeout back up" - + - globals.set: # clear global + id: force_ap + value: 'false' # set ap timeout to max 32 bit value in milliseconds. About 3.5 weeks. - lambda: |- wifi_wificomponent->set_ap_timeout(2147483647); @@ -175,7 +174,13 @@ script: - switch.toggle: blue_led - delay: 333ms - script.execute: blink_led - + - id: clear_wifi_script + then: + - lambda: |- + wifi_wificomponent->clear_stored_creds(); + - delay: 2s + - switch.turn_on: restart_switch + switch: @@ -205,6 +210,16 @@ switch: - platform: restart id: restart_switch + + - platform: template + id: clear_wifi_switch + name: Kauf Plug Clear WiFi Credentials + optimistic: true + disabled_by_default: true +# restore_state: no # no is default already per https://esphome.io/components/switch/template.html + on_turn_on: + then: + script.execute: clear_wifi_script # clock input from Home Assistant used to calculate total daily energy diff --git a/kauf-plug.bin b/kauf-plug.bin Binary files differindex a31cf0f..482647b 100644 --- a/kauf-plug.bin +++ b/kauf-plug.bin diff --git a/kauf-plug.bin.gz b/kauf-plug.bin.gz Binary files differindex 05a19c5..a5b19bd 100644 --- a/kauf-plug.bin.gz +++ b/kauf-plug.bin.gz |