diff options
author | KaufHA <[email protected]> | 2024-04-11 18:49:58 -0700 |
---|---|---|
committer | KaufHA <[email protected]> | 2024-04-11 18:49:58 -0700 |
commit | 47a14cb57eea902da8533a138ef1122588eb922c (patch) | |
tree | 5780ed24a6627647ffa0f1c453cf385dd9675cff /kauf-plug.yaml | |
parent | fc35dec2de01d88df109de45d8927ed87d9eaf07 (diff) | |
download | PLF10-47a14cb57eea902da8533a138ef1122588eb922c.tar.gz PLF10-47a14cb57eea902da8533a138ef1122588eb922c.zip |
remove legacy config entity
Diffstat (limited to 'kauf-plug.yaml')
-rw-r--r-- | kauf-plug.yaml | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/kauf-plug.yaml b/kauf-plug.yaml index 81ea7eb..9693374 100644 --- a/kauf-plug.yaml +++ b/kauf-plug.yaml @@ -797,56 +797,6 @@ select: - switch.turn_off: red_led - script.execute: script_set_power_leds - # legacy select monitor mode configuration; remove December 1, 2023 - # removed name, so won't show up in UI. This is kept so that previous - # setting can be migrated to new select entities. - # new entity is saved at same address with incremented hash so once the new - # one is saved, this one won't be loaded next time. - - platform: template - id: select_monitor_mode_old - optimistic: true - options: - - "10s P / 20s V,I" - - "10s P,I Only" - - "10s P,V Only" - - " 2s P,I Only" - - " 2s P,V Only" - - "YAML Configured" - - " 2s P / 4s V,I" - - "Didn't Restore" - initial_option: "Didn't Restore" - restore_value: true - icon: mdi:wrench-clock - entity_category: config - disabled_by_default: $disable_entities - forced_hash: 1025003090 - forced_addr: 0 - global_addr: global_forced_addr - set_action: - - script.execute: script_save_changes - - script.execute: script_setting_reboot - on_value: - - wait_until: # wait until new select entity is setup so it won't get overwritten with default value on setup - lambda: return ( id(select_monitor_interval).has_state() ); - - lambda: |- - if ( x == "Didn't Restore" ) { - id(select_monitor_mode_old).set_restore_value(false); // don't let old select save over new select - ESP_LOGD("Kauf Config Migration", "No legacy monitor mode configuration to migrate."); - } else { - ESP_LOGD("Kauf Config Migration", "Found legacy monitor mode configuration, migrating to new format."); - - // set monitor mode config select entity. 10s is default so just need to - auto call_sel = id(select_monitor_interval).make_call(); - if ( str_startswith(x,"10s") ) { call_sel.set_option("10s"); } - else if ( str_startswith(x," 2s") ) { call_sel.set_option("2s"); } - else { call_sel.set_option("YAML Configured"); } - call_sel.perform(); - - // go ahead and trigger a reboot on every config restoration - id(script_save_changes).execute(); - id(script_setting_reboot).execute(); - } - # change update interval for power monitoring sensors - platform: template name: $friendly_name Monitoring Update Interval |