diff options
Diffstat (limited to 'kauf-plug.yaml')
-rw-r--r-- | kauf-plug.yaml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/kauf-plug.yaml b/kauf-plug.yaml index 071d140..c32c4c0 100644 --- a/kauf-plug.yaml +++ b/kauf-plug.yaml @@ -15,7 +15,7 @@ substitutions: # https://esphome.io/components/esphome.html#esphome-creators-project project_name: Kauf.PLF10 - project_ver_num: "1.99" + project_ver_num: "1.991" project_ver_let: y # https://esphome.io/components/switch/gpio.html?highlight=restore_mode @@ -70,6 +70,7 @@ substitutions: sub_change_mode_every: "1" sub_update_interval: 10s sub_initial_mode: CURRENT + select_monitor_mode_initial_option: "10s P / 40s V,I" # GPIO definitions sub_pm_sel_pin: GPIO12 @@ -143,7 +144,7 @@ external_components: - source: type: git url: https://github.com/KaufHA/common - ref: v2022.11.01 + #ref: v2022.11.01 refresh: 0s @@ -322,7 +323,7 @@ script: - id: script_setting_reboot mode: restart # only reboot plug settings are static for 10s. Another change restarts timer. then: - - lambda: ESP_LOGD("kauf-plug.yaml","Setting change requiring reboot detected, rebooting in 10 seconds to effect change."); + - lambda: ESP_LOGCONFIG("kauf-plug.yaml","Setting change requiring reboot detected, rebooting in 10 seconds to effect change."); - delay: 10s - button.press: restart_button @@ -832,7 +833,8 @@ select: - " 2s P,I Only" - " 2s P,V Only" - "YAML Configured" - initial_option: "10s P / 40s V,I" + - " 2s P / 8s V,I" + initial_option: $select_monitor_mode_initial_option restore_value: true icon: mdi:wrench-clock entity_category: config @@ -857,6 +859,9 @@ select: id(hlw_main).set_update_interval(10000); id(hlw_main).set_change_mode_every(4294967295); id(hlw_main).set_initial_mode(hlw8012::HLW8012_INITIAL_MODE_VOLTAGE); } + else if ( x == " 2s P / 8s V,I" ) { + id(hlw_main).set_update_interval(2000); + id(hlw_main).set_change_mode_every(1); } else if ( x == " 2s P,I Only" ) { id(hlw_main).set_update_interval(2000); id(hlw_main).set_change_mode_every(4294967295); |