diff --git a/esphome/.clack-base.yaml b/esphome/.clack-base.yaml deleted file mode 100644 index 6de842c..0000000 --- a/esphome/.clack-base.yaml +++ /dev/null @@ -1,487 +0,0 @@ -# Basics -esphome: - name: ${name} - on_boot: - priority: 200 - then: - - script.execute: on_boot - -# OTA: -ota: - -# Enable Home Assistant API -api: - reboot_timeout: 0s - services: - - service: meterstand_clack - variables: - meter_value: float - then: - - globals.set: - id: totalWaterUsage - value: !lambda "return ( meter_value ) ;" - - sensor.template.publish: - id: clack_watermeter - state: !lambda |- - return id(totalWaterUsage); - - sensor.template.publish: - id: clack_m3_left - state: !lambda |- - return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; - - sensor.template.publish: - id: clack_l_left - state: !lambda |- - return int(id(clack_capacity_liters).state - id(clack_watermeter).state); - -globals: - - id: totalWaterUsage - type: float - restore_value: yes - initial_value: '00' - -# Define a global variable for the chlorinator delay duration in minutes - - id: duration - type: int - restore_value: yes - initial_value: '15' - -# Define a global variable for last regeneration time - - id: regeneration_last - type: std::string - restore_value: yes - initial_value: '"Never"' - -script: -### On reboot or powerloss of the esp, set the time left, last regeneration time, and capacity counters - - id: on_boot - then: - - sensor.template.publish: - id: clack_m3_left - state: !lambda |- - return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; - - sensor.template.publish: - id: clack_l_left - state: !lambda |- - return int(id(clack_capacity_liters).state - id(clack_watermeter).state); - - text_sensor.template.publish: - id: clack_regeneration_last - state: !lambda |- - return id(regeneration_last); - - light.turn_on: - id: led - effect: slow_pulse - red: 100% - green: 60% - blue: 0% - - wait_until: - condition: - wifi.connected: - - light.turn_on: - id: led - effect: pulse - red: 0% - green: 100% - blue: 0% - - wait_until: - condition: - api.connected: - - light.turn_on: - id: led - effect: none - red: 0% - green: 100% - blue: 0% - - delay: 5s - - light.turn_off: - id: led - -### Define a script that turns on the chlorinator relay, waits for the duration, and turns it off - - id: chlorinator_start - mode: restart - then: - - switch.turn_on: chlorinator_relay - # Use a lambda expression to return the delay in milliseconds - - delay: !lambda "return id(duration) * 60 * 1000;" - - switch.turn_off: chlorinator_relay - -light: -#G47=RGB WS2812C-2020 - - platform: esp32_rmt_led_strip - name: ${name} Led - id: led - rgb_order: GRB - pin: 47 - num_leds: 4 - # RMT 0 channels will be occupied by IR - rmt_channel: 1 - chipset: ws2812 - restore_mode: ALWAYS_OFF - -### ESP restart button -button: - - platform: restart - id: restart_button - name: ${name} ${clack_restart} - -#----------- -#SENSORS -#----------- -sensor: - ## - # Power meter - - platform: ina219 - address: 0x40 - shunt_resistance: 0.1 ohm - current: - name: ${name} Current - power: - name: ${name} Power - filters: - - delta: 0.05 - bus_voltage: - name: ${name} Voltage - shunt_voltage: - name: ${name} Shunt Voltage - max_voltage: 32.0V - max_current: 3.2A - update_interval: 5s - - - platform: vl53l0x - id: distance_cm - address: 0x29 - update_interval: ${salt_level_update_interval} - long_range: false - internal: false - filters: - - filter_out: nan - - lambda: return x*100; - ### comment with # if you want a direct reading - - median: - window_size: 15 - send_every: 7 - send_first_at: 1 - - delta: 0.5 - ### - - clamp: - min_value: 0.0 - max_value: 160.0 - on_value: - then: - - sensor.template.publish: - id: clack_distance - state: !lambda |- - return id(distance_cm).state; - - ## - # ultrasonic distance sensor. - - platform: template - name: ${name} ${clack_distance} - id: clack_distance - unit_of_measurement: cm - accuracy_decimals: 1 - icon: "mdi:arrow-expand-vertical" - device_class: distance - state_class: measurement - on_value: - then: - - sensor.template.publish: - id: clack_procent - state: !lambda |- - const float max_distance = id(clack_saltlevel_height_max).state; // heigt in cm to lowest level - const float min_distance = id(clack_saltlevel_height_min).state; // height in cm to highest level - return int((1-((id(clack_distance).state - min_distance)/max_distance))*100); - - sensor.template.publish: - id: clack_height - state: !lambda |- - const float max_distance = id(clack_saltlevel_height_max).state; // height in cm to lowest level - return max_distance-id(clack_distance).state; - - text_sensor.template.publish: - id: clack_fill_salt - state: !lambda |- - if (id(clack_height).state < id(clack_saltlevel_height_fill).state) { - return {"${clack_yes}"}; - } else { - return {"${clack_no}"}; - } - - ## - # ultrasonic distance sensor calculate tank_percentage - - platform: template - id: clack_procent - name: ${name} ${clack_procent} - unit_of_measurement: "%" - accuracy_decimals: 0 - icon: "mdi:percent-box-outline" - update_interval: ${tank_percentage_update_interval} - state_class: measurement - filters: - - lambda: |- - if (x >= 100) return 100.0; - else if (x <= 0.0) return 0.0; - else return x; - ## - # Saltlevel animation picture on dashboard - - platform: copy - source_id: clack_procent - id: clack_salt_level - name: ${name} ${clack_animation} - filters: - - lambda: |- - if (x >= 80) return 100; - else if (x >= 65 && x <= 79) return 80; - else if (x >= 40 && x <= 64) return 60; - else if (x >= 20 && x <= 39) return 40; - else if (x >= 10 && x <= 19) return 20; - else if (x >= 5 && x <= 9) return 10; - else if (x <= 4) return 0; - else return x; - - ## - # ultrasonic distance sensor calculate salt level from bottom - - platform: template - id: clack_height - name: ${name} ${clack_height} - unit_of_measurement: cm - accuracy_decimals: 1 - icon: "mdi:hydraulic-oil-level" - update_interval: ${clack_height_update_interval} - device_class: distance - state_class: measurement - filters: - - lambda: |- - if (x >= 100) return 100.0; - else if (x <= 0.0) return 0.0; - else return x; - -#------ -# CLACK -#------ - ## - # Watermeter - - platform: template - id: clack_watermeter - name: ${name} ${clack_watermeter_total} - icon: mdi:water - update_interval: ${watermeter_update_interval} - unit_of_measurement: L - device_class: water - state_class: total_increasing - accuracy_decimals: 1 - lambda: |- - return id(totalWaterUsage); - - - platform: template - id: clack_m3_left - name: ${name} ${clack_m3_left} - unit_of_measurement: m³ - device_class: water - state_class: total_increasing - accuracy_decimals: 2 - update_interval: ${watermeter_update_interval} - - - platform: template - id: clack_l_left - name: ${name} ${clack_l_left} - unit_of_measurement: L - device_class: water - state_class: total_increasing - accuracy_decimals: 0 - update_interval: ${watermeter_update_interval} - -switch: - ## - # Chlorinator Relay - - platform: gpio - pin: - number: 10 - inverted: false - name: ${name} ${clack_chlorinator} - id: chlorinator_relay - icon: mdi:alarm-bell - -select: - - id: clack_select_chl_or_dpsw - name: ${name} ${clack_select_chl_or_dpsw} - platform: template - options: - - ${clack_off} - - ${clack_chlorinator} - initial_option: ${clack_off} - optimistic: true - restore_value: true - -## -# Text sensors with general information. -text_sensor: - ## - # Expose ESPHome version as sensor. - - platform: version - id: clack_version - name: ${name} ${clack_version} - hide_timestamp: true - - ## - # Expose WiFi information as sensors. - - platform: wifi_info - ip_address: - name: ${name} ${clack_ip} - icon: mdi:ip-network - - ## - # Textsensor "Fill Salt" yes or no. - - platform: template - name: ${name} ${clack_fill_salt} - id: clack_fill_salt - icon: mdi:basket-fill - update_interval: never - -## -# imput numbers as sliders for setting the dimensions of the tank and level alarm. -number: - ## - # Set minimum distance (from bottom sensor / above plastic cap) - - platform: template - id: clack_saltlevel_height_min - name: ${name} ${clack_saltlevel_height_min} - icon: mdi:toggle-switch-variant - optimistic: true - mode: slider - step: 0.5 - entity_category: config - min_value: 0 - max_value: 10 - initial_value: 0 - restore_value: yes - unit_of_measurement: cm - on_value: - then: - - sensor.template.publish: - id: clack_procent - state: !lambda |- - const float max_distance = id(clack_saltlevel_height_max).state; // heigt in cm to lowest level - const float min_distance = id(clack_saltlevel_height_min).state; // height in cm to highest level - return int((1-((id(clack_distance).state - min_distance)/max_distance))*100); - - sensor.template.publish: - id: clack_height - state: !lambda |- - const float max_distance = id(clack_saltlevel_height_max).state; // height in cm to lowest level - return max_distance-id(clack_distance).state; - - ## - # Set maximum distance (from bottom sensor / underneath plastic cap) to water level (to measure in pipe?) - - platform: template - id: clack_saltlevel_height_max - name: ${name} ${clack_saltlevel_height_max} - icon: mdi:toggle-switch-variant-off - optimistic: true - mode: slider - step: 0.5 - entity_category: config - min_value: 0 - max_value: 100 - initial_value: 30 - restore_value: yes - unit_of_measurement: cm - on_value: - then: - - sensor.template.publish: - id: clack_procent - state: !lambda |- - const float max_distance = id(clack_saltlevel_height_max).state; // heigt in cm to lowest level - const float min_distance = id(clack_saltlevel_height_min).state; // height in cm to highest level - return int((1-((id(clack_distance).state - min_distance)/max_distance))*100); - - sensor.template.publish: - id: clack_height - state: !lambda |- - const float max_distance = id(clack_saltlevel_height_max).state; // height in cm to lowest level - return max_distance-id(clack_distance).state; - ## - # Set alarm level - - platform: template - id: clack_saltlevel_height_fill - name: ${name} ${clack_saltlevel_height_fill} - icon: mdi:hydraulic-oil-temperature - optimistic: true - mode: slider - step: 0.1 - entity_category: config - min_value: 0 - max_value: 10 - initial_value: 1.5 - restore_value: yes - unit_of_measurement: cm - update_interval: 600s - on_value: - then: - - text_sensor.template.publish: - id: clack_fill_salt - state: !lambda |- - if (id(clack_height).state < id(clack_saltlevel_height_fill).state) { - return {"${clack_yes}"}; - } else { - return {"${clack_no}"}; - } - ## - # Set capacity liters - - platform: template - id: clack_capacity_liters - name: ${name} ${clack_capacity_liters} - icon: mdi:water-opacity - optimistic: true - mode: slider - step: 50 - entity_category: config - min_value: 0 - max_value: 12000 - initial_value: 3200 - restore_value: yes - unit_of_measurement: L - on_value: - then: - - sensor.template.publish: - id: clack_watermeter - state: !lambda |- - return id(totalWaterUsage); - - sensor.template.publish: - id: clack_m3_left - state: !lambda |- - return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; - - sensor.template.publish: - id: clack_l_left - state: !lambda |- - return int(id(clack_capacity_liters).state - id(clack_watermeter).state); - ## - # Set capacity days - - platform: template - id: clack_capacity_days - name: ${name} ${clack_capacity_days} - icon: mdi:calendar-clock - optimistic: true - mode: slider - step: 1 - entity_category: config - min_value: 0 - max_value: 21 - initial_value: 10 - restore_value: yes - unit_of_measurement: ${days} - ## - # Set chlorinator relay off-delay - - platform: template - id: clack_chlorinator_delay - name: ${name} ${clack_chlorinator_delay} - icon: mdi:toggle-switch-variant - optimistic: true - mode: slider - step: 1 - entity_category: config - min_value: 0 - max_value: 35 - initial_value: 10 - restore_value: yes - unit_of_measurement: "min" - on_value: - then: - - globals.set: - id: duration - value: !lambda 'return int(x);' diff --git a/esphome/.clack-labels-en.yaml b/esphome/.clack-labels-en.yaml deleted file mode 100644 index 8b5400a..0000000 --- a/esphome/.clack-labels-en.yaml +++ /dev/null @@ -1,50 +0,0 @@ -substitutions: - clack_select_chl_or_dpsw: Function mode - clack_distance: Salt level distance - clack_procent: Salt level percent - clack_animation: Salt level for dashboard - clack_height: Salt level height - clack_watermeter_total: Water meter - clack_m3_left: Water softener m3 left - clack_l_left: Water softener ltr left - clack_version: Version - clack_regeneration_last: Regenerated on - clack_fill_salt: Fill salt - clack_saltlevel_height_min: Min salt distance - clack_saltlevel_height_max: Max salt distance - clack_saltlevel_height_fill: Fill salt distance - clack_capacity_liters: Capacity in liters - clack_capacity_days: Capacity in days - clack_chlorinator_delay: Chlorinator active time - clack_watermeter_pulse: Watermeter pulse - clack_regeneration_pulse: Regeneration pulse - clack_ip: Water softener IP - clack_wifi_signal_db: WiFi Signal dB - clack_wifi_signal_db_percent: WiFi Signal - clack_uptime: Uptime - clack_chlorinator: Chlorinator - clack_select_salt_measurement: Salt measurement - clack_measure_always: Always - clack_measure_during_brine: Only during brine - clack_salt_measurent_in_brine_delay: Delay measure salt brine - hours: hours - days: days - clack_yes: "yes" - clack_no: "no" - clack_on: "On" - clack_off: "Off" - clack_power: Power - clack_current: Current - clack_voltage: Voltage - clack_shunt_voltage: Voltage - clack_restart: ESP Restart - -text_sensor: - # Expose last regeneration information as sensor / already in English - - platform: template - name: ${name} ${clack_regeneration_last} - id: clack_regeneration_last - icon: mdi:clock-start - update_interval: never - lambda: |- - return id(regeneration_last); diff --git a/esphome/.clack-labels-nl.yaml b/esphome/.clack-labels-nl.yaml deleted file mode 100644 index 92dcab4..0000000 --- a/esphome/.clack-labels-nl.yaml +++ /dev/null @@ -1,70 +0,0 @@ -substitutions: - clack_select_chl_or_dpsw: Functie mode - clack_distance: Zoutniveau afstand - clack_procent: Zoutniveau procent - clack_animation: Zoutniveau voor dashboard - clack_height: Zoutniveau hoogte - clack_watermeter_total: Watermeter - clack_m3_left: Waterontharder m3 over - clack_l_left: Waterontharder ltr over - clack_version: Versie - clack_regeneration_last: Geregenereerd op - clack_fill_salt: Zout bijvullen - clack_saltlevel_height_min: Min afstand zout - clack_saltlevel_height_max: Max afstand zout - clack_saltlevel_height_fill: Zout bijvullen afstand - clack_capacity_liters: Capaciteit in liters - clack_capacity_days: Capaciteit in dagen - clack_chlorinator_delay: Chlorinator aktief tijd - clack_watermeter_pulse: Watermeter pulse - clack_regeneration_pulse: Regeneratie pulse - clack_ip: Waterontharder IP - clack_wifi_signal_db: WiFi Signaal dB - clack_wifi_signal_db_percent: WiFi Signaal - clack_uptime: Uptime - clack_chlorinator: Chlorinator - clack_select_salt_measurement: Zout niveau meting - clack_measure_always: Altijd - clack_measure_during_brine: Alleen na bezouting - hours: uur - days: dagen - clack_yes: ja - clack_no: nee - clack_on: Aan - clack_off: Uit - clack_power: Vermogen - clack_current: Stroom - clack_voltage: Spanning - clack_shunt_voltage: Shunt spanning - clack_restart: ESP Herstart - -text_sensor: - # Expose last regeneration information as sensor - - platform: template - name: ${name} ${clack_regeneration_last} - id: clack_regeneration_last - icon: mdi:clock-start - update_interval: never - lambda: |- - return id(regeneration_last); - filters: - - substitute: - - "Jan -> jan" - - "Feb -> feb" - - "Mar -> mar" - - "Apr -> apr" - - "May -> mei" - - "Jun -> jun" - - "Jul -> jul" - - "Aug -> aug" - - "Sep -> sep" - - "Okt -> okt" - - "Nov -> nov" - - "Dec -> dec" - - "Mon -> maa" - - "Tue -> din" - - "Wed -> woe" - - "Thu -> don" - - "Fri -> vri" - - "Sat -> zat" - - "Sun -> zon" diff --git a/esphome/.clack-optional.yaml b/esphome/.clack-optional.yaml deleted file mode 100644 index d018b1e..0000000 --- a/esphome/.clack-optional.yaml +++ /dev/null @@ -1,30 +0,0 @@ -#----------- -# SENSORS -#----------- -sensor: - ## - # Diagnostics wifi and uptime - - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB - id: clack_wifi_signal_db - name: ${name} WiFi Signal dB - update_interval: 60s - device_class: signal_strength - entity_category: diagnostic - - - platform: copy # Reports the WiFi signal strength in % - source_id: clack_wifi_signal_db - id: clack_wifi_signal_db_percent - name: ${name} WiFi Signal - filters: - - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); - unit_of_measurement: "%" - entity_category: diagnostic - - - platform: uptime - id: clack_uptime - name: ${name} ${clack_uptime} - unit_of_measurement: ${days} - update_interval: 3600s - accuracy_decimals: 1 - filters: - - multiply: 0.000011574 \ No newline at end of file diff --git a/esphome/board-esp32-wemos-s3.yaml b/esphome/board-esp32-wemos-s3.yaml deleted file mode 100644 index 16d9efb..0000000 --- a/esphome/board-esp32-wemos-s3.yaml +++ /dev/null @@ -1,188 +0,0 @@ -### ESP32S3 used is a wemos s3 mini - -esp32: - board: lolin_s3 - variant: esp32s3 - framework: - type: arduino -# version: latest - flash_size: 4MB - -# the m5stack TOF sensor vl53l0x is I2C -i2c: - - id: bus_a - sda: 35 #21 ##35 of #2 op lolin s3? - scl: 36 #22 ##36 of #4 op lolin s3? - scan: true - -# get rid of CDC error -esphome: - platformio_options: - board_build.arduino.memory_type: qio_qspi - board_upload.ram_size: 327680 - board_upload_maximum_size: 4193404 - board_upload_speed: 460800 - build_flags: [ - "-DBOARD_HAS_PSRAM", - "-DARDUINO_LOLIN_S3_MINI", - "-DARDUINO_USB_MODE=1"] -# board_build.extra_flags: -# - "-DARDUINO_USB_CDC_ON_BOOT=0" # Override, defaults to '-DARDUINO_USB_CDC_ON_BOOT=1' - -# Enable/Disable logging -logger: - logs: - esp32.preferences: WARN - sensor: WARN - text_sensor: WARN - switch: WARN - button: WARN - number: WARN - # baud_rate: 0 # <--- super important! for ESP8266 - -wifi: - ap: - ssid: "${name}" - password: "configesp" - -# enable IMPROV wifi, connection hotspot via bluetooth. see https://www.improv-wifi.com/ -esp32_improv: - authorizer: None - -captive_portal: - -# Enable Web server. -web_server: - port: 80 - -## watermeter pulse / relay 1 -binary_sensor: - - platform: gpio - pin: - number: 16 # wemos s3 mini: 16, lilygo ESP32S3 T7-S3: 12-1, mh-et-live: 16, wemos d1 mini -D4 - inverted: true - mode: - input: true - pullup: true - id: clack_watermeter_pulse - name: ${name} ${clack_watermeter_pulse} -# icon: mdi:toggle-switch-variant - filters: - - delayed_on_off: 50ms - on_press: - then: - - sensor.template.publish: - id: clack_watermeter - state: !lambda |- - return id(totalWaterUsage) += float(${pulse_liters}); - - sensor.template.publish: - id: clack_m3_left - state: !lambda |- - return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; - - sensor.template.publish: - id: clack_l_left - state: !lambda |- - return int(id(clack_capacity_liters).state - id(clack_watermeter).state); - - ## regeneration pulse / relay 2 - - platform: gpio - pin: - number: 12 # wemos s3 mini: 12, lilygo ESP32S3 T7-S3: 18, mh-et-live: 18, wemos d1 mini -D5 - inverted: true - mode: - input: true - pullup: true - id: clack_regeneration_pulse - name: ${name} ${clack_regeneration_pulse} -# icon: mdi:toggle-switch-variant - filters: - - delayed_on_off: 800ms - on_press: - then: - - globals.set: - id: totalWaterUsage - value: '00' - - text_sensor.template.publish: - id: clack_regeneration_last - state: !lambda |- - char str[32]; - time_t currTime = id(clack_sntp_time).now().timestamp; - strftime(str, sizeof(str), "%a %d %b %H:%M", localtime(&currTime)); - id(regeneration_last) = str; - return { str }; - - sensor.template.publish: - id: clack_watermeter - state: !lambda |- - return id(totalWaterUsage); - - sensor.template.publish: - id: clack_m3_left - state: !lambda |- - return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; - - sensor.template.publish: - id: clack_l_left - state: !lambda |- - return int(id(clack_capacity_liters).state - id(clack_watermeter).state); - - if: - condition: - - lambda: 'return id(clack_select_chl_or_dpsw).state == "Chlorinator";' - then: - - script.execute: chlorinator_start - -button: -## temporary test button for testing water meter pulse - - id: clack_use_test_button - name: ${name} Test button use pulse - platform: template - on_press: - then: - - sensor.template.publish: - id: clack_watermeter - state: !lambda |- - return id(totalWaterUsage) += float(${pulse_liters}); - - sensor.template.publish: - id: clack_m3_left - state: !lambda |- - return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; - - sensor.template.publish: - id: clack_l_left - state: !lambda |- - return int(id(clack_capacity_liters).state - id(clack_watermeter).state); - - lambda: |- - ESP_LOGI("UseTest", "Use button pressed"); - -## temporary test button for testing regeneration pulse - - id: clack_reg_test_button - name: ${name} Test button regen pulse - platform: template - on_press: - then: - - globals.set: - id: totalWaterUsage - value: '00' - - text_sensor.template.publish: - id: clack_regeneration_last - state: !lambda |- - char str[32]; - time_t currTime = id(clack_sntp_time).now().timestamp; - strftime(str, sizeof(str), "%a %d %b %H:%M", localtime(&currTime)); - id(regeneration_last) = str; - return { str }; - - sensor.template.publish: - id: clack_watermeter - state: !lambda |- - return id(totalWaterUsage); - - sensor.template.publish: - id: clack_m3_left - state: !lambda |- - return float(id(clack_capacity_liters).state - id(clack_watermeter).state) * 0.001; - - sensor.template.publish: - id: clack_l_left - state: !lambda |- - return int(id(clack_capacity_liters).state - id(clack_watermeter).state); - - lambda: |- - ESP_LOGI("RegTest", "Regeneration button pressed"); - - if: - condition: - - lambda: 'return id(clack_select_chl_or_dpsw).state == "Chlorinator";' - then: - - script.execute: chlorinator_start diff --git a/esphome/clack.yaml b/esphome/clack.yaml deleted file mode 100644 index 37131a7..0000000 --- a/esphome/clack.yaml +++ /dev/null @@ -1,49 +0,0 @@ -substitutions: - # General substitutions: - name: clack - device_description: "Esphome component for Clack WS1 softener with TOF sensor saltlevel detection" - timezone: "Europe/Amsterdam" - # Interval substitutions: - salt_level_update_interval: 30s - watermeter_update_interval: 600s # 10 minutes - tank_percentage_update_interval: 600s - clack_height_update_interval: 600s - pulse_liters: "2.18" - -# In order to use other language fix clack-label filename below: -# Currently supported languages are en (english), nl (dutch). -# ESP32-wemos-s3 is a wemos lolin S3 mini -packages: - remote_package: - url: https://github.com/fonske/clack-reader-v3 - ref: main - refresh: 0s - files: [ - esphome/.clack-base.yaml, - esphome/.clack-optional.yaml, - esphome/.clack-labels-en.yaml, - esphome/board-esp32-wemos-s3.yaml - ] - -## for developing/testing, uncomment local includes and comment out above remote_package packages part. -#packages: -# substitutions: !include .clack-labels-en.yaml -# substitutions: !include .clack-labels-nl.yaml -# device_base1: !include board-esp32-wemos-s3.yaml - -time: - - platform: sntp - id: clack_sntp_time - timezone: ${timezone} - # Enable this with your own NTP server if your device is on a no internet IOT lan. - #servers: 192.168.X.X - -wifi: - ssid: !secret wifi_ssid - password: !secret wifi_password - fast_connect: true - # Enable fallback hotspot (captive portal) in case wifi connection fails - ap: - ssid: "${name}" - password: "configesp" - ap_timeout: 15s diff --git a/esphome/secrets.yaml b/esphome/secrets.yaml deleted file mode 100644 index f7e3bf2..0000000 --- a/esphome/secrets.yaml +++ /dev/null @@ -1,3 +0,0 @@ -# Your Wi-Fi SSID and password -wifi_ssid: "TestWifi" -wifi_password: "TestWifiSecret" diff --git a/home_assistant/clack_en.yaml b/home_assistant/clack_en.yaml deleted file mode 100644 index 789a3e4..0000000 --- a/home_assistant/clack_en.yaml +++ /dev/null @@ -1,261 +0,0 @@ -#------------ -#INPUT SELECT -#------------ -# Remark: The step second backwash, between Brine and Rinse is removed -# Removing this step reduces the amount of wastewater en is probably not necessary for the performance of the softener -# This can be setup in the clack menus. See manual. -input_select: - clack_water_softener_status: - name: Water softener status - options: - - Backwash - - Brine - - Rinse - - Fill - - Idle - initial: Idle - -#----------- -#TIMERS -#----------- -# Remark: change the timer settings, upon your own timing (measure time with stopwatch on the complet regen. cycle) -timer: - timer_ws_backwash: - name: Backwash -# duration: '0:00:57' - duration: '0:00:10' - - timer_ws_brine: - name: Brine -# duration: '0:01:07' - duration: '0:00:10' - - timer_ws_rinse: - name: Rinse -# duration: '0:01:14' - duration: '0:00:10' - - timer_ws_fill: - name: Fill -# duration: '0:01:10' - duration: '0:00:10' - - timer_ws_total: #sum of all above values - name: Total -# duration: '0:05:44' - duration: '0:00:40' - -#----------- -#SENSORS -#----------- -template: - sensor: - - name: "time_to_regeneration" # custom sensor that calculates the expected number of days till the next regeneration - state: > - {%- set time = (states('number.clack_capacity_in_days') | int * 86400) - (as_timestamp(now()) - as_timestamp((strptime(states('sensor.clack_regenerated_on')[4:15], '%d %b %H:%M').replace(year=now().year)))) | int %} - {%- set hours = ((time % 86400) // 3600) %} - {%- set hours = '{}h '.format(hours) if hours > 0 else '' %} - {%- set days = (time // 86400) %} - {%- set days = '{}d '.format(days) if days > 0 else '' %} - {{days + hours}} - unique_id: "time_to_regeneration" - icon: mdi:calendar-clock - -#----------- -#UTILITY METER -#----------- -utility_meter: - clack_waterusage_this_quarter: - source: sensor.clack_water_meter - cycle: quarter-hourly - clack_waterusage_this_hour: - source: sensor.clack_water_meter - cycle: hourly - clack_waterusage_today: - source: sensor.clack_water_meter - cycle: daily - clack_waterusage_this_month: - source: sensor.clack_water_meter - cycle: monthly - clack_waterusage_this_year: - source: sensor.clack_water_meter - cycle: yearly - -automation: - #################################################### - - id: set_water_softener_start_backwash - alias: Set water softener start Backwash - trigger: - - platform: state - entity_id: - - binary_sensor.clack_regeneration_pulse - to: 'on' - - platform: state - entity_id: button.clack_test_button_regen_pulse - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Idle - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Backwash - - service: timer.start - entity_id: timer.timer_ws_backwash - - service: timer.start - entity_id: timer.timer_ws_total - initial_state: true - #################################################### - - id: set_water_softener_start_brine - alias: Set water softener start Brine - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_backwash - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Backwash - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Brine - - service: timer.start - entity_id: timer.timer_ws_brine - initial_state: true - #################################################### - - id: set_water_softener_start_rinse - alias: Set water softener start Rinse - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_brine - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Brine - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Rinse - - service: timer.start - entity_id: timer.timer_ws_rinse - initial_state: true - #################################################### - - id: set_water_softener_start_fill - alias: Set water softener start Fill - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_rinse - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Rinse - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Fill - - service: timer.start - entity_id: timer.timer_ws_fill - initial_state: true - #################################################### - - id: set_water_softener_idle - alias: Set water softener Idle - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_fill - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Fill - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Idle - - service: esphome.clack_meterstand_clack - data: - meter_value: 0 - - service: input_number.set_value - data_template: - entity_id: input_number.clack_water_softener_meter_liters - value: 0 - initial_state: true - #------------------------------------------------------------------ - # Extra options: Salt level alarm and hardness measurement alarm. - # Fill in your own mobile_app_iphone_van_xxx in. (as an example) - #------------------------------------------------------------------ - - id: salt_level_alarm_notify - alias: Salt level alarm notify - description: '' - trigger: - - platform: state - entity_id: sensor.clack_fill_salt - to: "yes" - condition: - - condition: time - after: 07:30:00 - before: '22:00:00' - action: - - service: notify.mobile_app_iphone_van_a_c_a - data: - title: Be aware! - message: Salt level watersoftener is low! Fill salt today! - data: - push: - sound: - name: default - critical: 1 - volume: 1 - - delay: - minutes: 30 - initial_state: 'true' - mode: single - #################################################### - - id: measure_hardness_notify - alias: Measure Hardness - description: '' - trigger: - - platform: numeric_state - entity_id: - - sensor.clack_watermeter - above: 3000 - condition: - - condition: time - after: 07:30:00 - before: '22:00:00' - action: - - service: notify.mobile_app_iphone_van_a_c_a - data: - title: Be aware! - message: 'Measure hardness softener: used 3000 ltr' - data: - push: - sound: - name: default - critical: 1 - volume: 1 - - delay: - minutes: 30 - mode: single - initial_state: 'true' diff --git a/home_assistant/clack_en_1_rly_extra_code.yaml b/home_assistant/clack_en_1_rly_extra_code.yaml deleted file mode 100644 index 2f2fd1e..0000000 --- a/home_assistant/clack_en_1_rly_extra_code.yaml +++ /dev/null @@ -1,40 +0,0 @@ -#----------- -# EXTRA CODE FOR CLACK VERSION WITH ONLY 1 RELAY TERMINAL FOR (10?) LITER PULSE -# USE THIS TIMER AND AUTOMATION ONLY ON A CLACK WITHOUT RLY2 FOR REPLACEMENT OF THE REGENERATION PULSE!!! -# IT IS BASED ON THE POWER CONSUMPTION OF THE CAM MOTOR RUNNING. > 1.5 WATT POWER CONSUMPTION = REGENERATION -#----------- -timer: - timer_alt_regeneration_pulse: - name: Delay - -automation: -#----------- -#USE THIS AUTOMATION ONLY ON A CLACK WITHOUT RLY2 FOR REGENERATION PULSE!!! -#----------- - - id: set_reg_pulse_by_cammotor - alias: Regenerationpulse based on cammotor power detection - description: Regenerationpulse based on cammotor power detection - trigger: - - platform: numeric_state - entity_id: - - sensor.clack_power - above: 1.5 - condition: - - condition: and - conditions: [] - - condition: state - entity_id: timer.timer_alt_regeneration_pulse - state: idle - action: - - service: button.press - metadata: {} - data: {} - target: - entity_id: button.clack_test_button_regen_pulse - - service: timer.start - data: - duration: 0:59:00 - target: - entity_id: timer.timer_alt_regeneration_pulse - initial_state: true - mode: single \ No newline at end of file diff --git a/home_assistant/clack_en_backwash2.yaml b/home_assistant/clack_en_backwash2.yaml deleted file mode 100644 index f0c8768..0000000 --- a/home_assistant/clack_en_backwash2.yaml +++ /dev/null @@ -1,289 +0,0 @@ -#------------ -#INPUT SELECT -#------------ -# -# -# -input_select: - clack_water_softener_status: - name: Water softener status - options: - - Backwash - - Brine - - Backwash2 - - Rinse - - Fill - - Idle - initial: Idle - -#----------- -#TIMERS -#----------- -# Remark: change the timer settings, upon your own timing (measure time with stopwatch on the complet regen. cycle) -timer: - timer_ws_backwash: - name: Backwash -# duration: '0:00:57' - duration: '0:00:10' - - timer_ws_brine: - name: Brine -# duration: '0:01:07' - duration: '0:00:10' - - timer_ws_backwash2: - name: Backwash2 -# duration: '0:00:57' - duration: '0:00:10' - - timer_ws_rinse: - name: Rinse -# duration: '0:01:14' - duration: '0:00:10' - - timer_ws_fill: - name: Fill -# duration: '0:01:10' - duration: '0:00:10' - - timer_ws_total: #sum of all above values - name: Total -# duration: '0:05:44' - duration: '0:00:50' - -#----------- -#SENSORS -#----------- -template: - sensor: - - name: "time_to_regeneration" # custom sensor that calculates the expected number of days till the next regeneration - state: > - {%- set time = (states('number.clack_capacity_in_days') | int * 86400) - (as_timestamp(now()) - as_timestamp((strptime(states('sensor.clack_regenerated_on')[4:15], '%d %b %H:%M').replace(year=now().year)))) | int %} - {%- set hours = ((time % 86400) // 3600) %} - {%- set hours = '{}h '.format(hours) if hours > 0 else '' %} - {%- set days = (time // 86400) %} - {%- set days = '{}d '.format(days) if days > 0 else '' %} - {{days + hours}} - unique_id: "time_to_regeneration" - icon: mdi:calendar-clock - -#----------- -#UTILITY METER -#----------- -utility_meter: - clack_waterusage_this_quarter: - source: sensor.clack_water_meter - cycle: quarter-hourly - clack_waterusage_this_hour: - source: sensor.clack_water_meter - cycle: hourly - clack_waterusage_today: - source: sensor.clack_water_meter - cycle: daily - clack_waterusage_this_month: - source: sensor.clack_water_meter - cycle: monthly - clack_waterusage_this_year: - source: sensor.clack_water_meter - cycle: yearly - -automation: - #################################################### - - id: set_water_softener_start_backwash - alias: Set water softener start Backwash - trigger: - - platform: state - entity_id: - - binary_sensor.clack_regeneration_pulse - to: 'on' - - platform: state - entity_id: button.clack_test_button_regen_pulse - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Idle - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Backwash - - service: timer.start - entity_id: timer.timer_ws_backwash - - service: timer.start - entity_id: timer.timer_ws_total - initial_state: true - #################################################### - - id: set_water_softener_start_brine - alias: Set water softener start Brine - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_backwash - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Backwash - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Brine - - service: timer.start - entity_id: timer.timer_ws_brine - initial_state: true - #################################################### - - id: set_water_softener_start_backwash2 - alias: Set water softener start Backwash2 - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_brine - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Brine - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Backwash2 - - service: timer.start - entity_id: timer.timer_ws_backwash2 - initial_state: true - #################################################### - - id: set_water_softener_start_rinse - alias: Set water softener start Rinse - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_backwash2 - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Backwash2 - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Rinse - - service: timer.start - entity_id: timer.timer_ws_rinse - initial_state: true - #################################################### - - id: set_water_softener_start_fill - alias: Set water softener start Fill - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_rinse - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Rinse - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Fill - - service: timer.start - entity_id: timer.timer_ws_fill - initial_state: true - #################################################### - - id: set_water_softener_idle - alias: Set water softener Idle - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_fill - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: Fill - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: Idle - - service: esphome.clack_meterstand_clack - data: - meter_value: 0 - - service: input_number.set_value - data_template: - entity_id: input_number.clack_water_softener_meter_liters - value: 0 - initial_state: true - #------------------------------------------------------------------ - # Extra options: Salt level alarm and hardness measurement alarm. - # Fill in your own mobile_app_iphone_van_xxx in. (as an example) - #------------------------------------------------------------------ - - id: salt_level_alarm_notify - alias: Salt level alarm notify - description: '' - trigger: - - platform: state - entity_id: sensor.clack_fill_salt - to: "yes" - condition: - - condition: time - after: 07:30:00 - before: '22:00:00' - action: - - service: notify.mobile_app_iphone_van_a_c_a - data: - title: Be aware! - message: Salt level watersoftener is low! Fill salt today! - data: - push: - sound: - name: default - critical: 1 - volume: 1 - - delay: - minutes: 30 - initial_state: 'true' - mode: single - #################################################### - - id: measure_hardness_notify - alias: Measure Hardness - description: '' - trigger: - - platform: numeric_state - entity_id: - - sensor.clack_watermeter - above: 3000 - condition: - - condition: time - after: 07:30:00 - before: '22:00:00' - action: - - service: notify.mobile_app_iphone_van_a_c_a - data: - title: Be aware! - message: 'Measure hardness softener: used 3000 ltr' - data: - push: - sound: - name: default - critical: 1 - volume: 1 - - delay: - minutes: 30 - mode: single - initial_state: 'true' diff --git a/home_assistant/clack_nl.yaml b/home_assistant/clack_nl.yaml deleted file mode 100644 index 720344c..0000000 --- a/home_assistant/clack_nl.yaml +++ /dev/null @@ -1,263 +0,0 @@ -#------------ -#INPUT SELECT -#------------ -# Opm: de stap 2e terugspoeling (backwash) is eruit gehaald, tussen zoutspoeling en snelspoeling. -# Deze stap weghalen bespaart water en is mogelijk niet persee nodig. Dit kan ingesteld worden in de Clack -input_select: - clack_water_softener_status: - name: Water softener status - options: - - terugspoeling - - zoutspoeling - - snelspoeling - - vullen - - standby - initial: standby - -#----------- -#TIMERS -#----------- -# Opm: verander deze naar de eigen tijdsduur van de waterontharder (stopwatch) -timer: - timer_ws_backwash: - name: terugspoeling -# duration: '0:00:57' - duration: '0:00:10' - - timer_ws_brine: - name: zoutspoeling -# duration: '0:01:07' - duration: '0:00:10' - - timer_ws_rinse: - name: snelspoeling -# duration: '0:01:14' - duration: '0:00:10' - - timer_ws_fill: - name: vullen -# duration: '0:01:10' - duration: '0:00:10' - - timer_ws_total: #sum of all above values - name: total -# duration: '0:05:44' - duration: '0:00:40' - -#----------- -#SENSORS -#----------- -template: - sensor: - - name: "tijd_tot_regeneratie" # custom sensor die het aantal dagen berekend totdat opnieuw een regeneratie van de waterontharder moet plaatsvinden - state: > - {%- set time = (states('number.clack_capaciteit_in_dagen') | int * 86400) - (as_timestamp(now()) - as_timestamp((strptime(states('sensor.clack_geregenereerd_op')[4:15], '%d %b %H:%M').replace(year=now().year)))) | int %} - {%- set hours = ((time % 86400) // 3600) %} - {%- set hours = '{}h '.format(hours) if hours > 0 else '' %} - {%- set days = (time // 86400) %} - {%- set days = '{}d '.format(days) if days > 0 else '' %} - {{days + hours}} - unique_id: "tijd_tot_regeneratie" - icon: mdi:calendar-clock - -#----------- -#UTILITY METER -#----------- -utility_meter: - clack_waterverbruik_dit_kwartier: - source: sensor.clack_watermeter - cycle: quarter-hourly - clack_waterverbruik_dit_uur: - source: sensor.clack_watermeter - cycle: hourly - clack_waterverbruik_vandaag: - source: sensor.clack_watermeter - cycle: daily - clack_waterverbruik_maand: - source: sensor.clack_watermeter - cycle: monthly - clack_waterverbruik_jaar: - source: sensor.clack_watermeter - cycle: yearly - -#----------- -#AUTOMATIONS -#----------- -automation: - #################################################### - - id: set_water_softener_start_backwash - alias: Set water softener start backwash - trigger: - - platform: state - entity_id: - - binary_sensor.clack_regeneratie_pulse - to: 'on' - - platform: state - entity_id: button.clack_test_button_regen_pulse - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: standby - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: terugspoeling - - service: timer.start - entity_id: timer.timer_ws_backwash - - service: timer.start - entity_id: timer.timer_ws_total - initial_state: true - #################################################### - - id: set_water_softener_start_brine - alias: Set water softener start brine - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_backwash - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: terugspoeling - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: zoutspoeling - - service: timer.start - entity_id: timer.timer_ws_brine - initial_state: true - #################################################### - - id: set_water_softener_start_rinse - alias: Set water softener start rinse - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_brine - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: zoutspoeling - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: snelspoeling - - service: timer.start - entity_id: timer.timer_ws_rinse - initial_state: true - #################################################### - - id: set_water_softener_start_fill - alias: Set water softener start fill - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_rinse - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: snelspoeling - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: vullen - - service: timer.start - entity_id: timer.timer_ws_fill - initial_state: true - #################################################### - - id: set_water_softener_idle - alias: Set water softener Idle - trigger: - - platform: event - event_type: timer.finished - event_data: - entity_id: timer.timer_ws_fill - condition: - - condition: and - conditions: - - condition: state - entity_id: input_select.clack_water_softener_status - state: vullen - action: - - service: input_select.select_option - data: - entity_id: input_select.clack_water_softener_status - option: standby - - service: esphome.clack_meterstand_clack - data: - meter_value: 0 - - service: input_number.set_value - data_template: - entity_id: input_number.clack_water_softener_meter_liters - value: 0 - initial_state: true - #------------------------------------------------------------------ - # Automatisering opties: alarm zoutmelding en alarm hardheid meten. - # vul je eigen mobile_app_iphone_van_xxx in. (als voorbeeld) - #------------------------------------------------------------------ - - id: salt_level_alarm_notify - alias: Zoutniveau alarm melding - description: '' - trigger: - - platform: state - entity_id: sensor.clack_zout_bijvullen - to: ja - condition: - - condition: time - after: 07:30:00 - before: '22:00:00' - action: - - service: notify.mobile_app_iphone_van_a_c_a - data: - title: Let op! - message: Zout niveau van ontharder is laag! Vandaag gaan bijvullen! - data: - push: - sound: - name: default - critical: 1 - volume: 1 - - delay: - minutes: 30 - initial_state: 'true' - mode: single - ################################################## - - id: measure_hardness_notify - alias: Hardheid meten - description: '' - trigger: - - platform: numeric_state - entity_id: - - sensor.clack_watermeter - above: 3000 - condition: - - condition: time - after: 07:30:00 - before: '22:00:00' - action: - - service: notify.mobile_app_iphone_van_a_c_a - data: - title: Let op! - data: - push: - sound: - name: default - critical: 1 - volume: 1 - message: 'Ontharder hardheid meten: nu 3000 ltr' - - delay: - minutes: 30 - mode: single - initial_state: 'true' \ No newline at end of file diff --git a/home_assistant/lovelace_menu_en.yaml b/home_assistant/lovelace_menu_en.yaml deleted file mode 100644 index ac0053a..0000000 --- a/home_assistant/lovelace_menu_en.yaml +++ /dev/null @@ -1,265 +0,0 @@ -views: - - title: Watersoftener - path: watersoftener - badges: [] - cards: - - type: vertical-stack - cards: - - cards: - - type: entities - entities: - - entity: sensor.clack_water_meter - type: custom:multiple-entity-row - icon: mdi:cup-water - name: Water softener - secondary_info: - entity: input_select.clack_water_softener_status - name: 'cycle: ' - state_header: used - entities: - - entity: sensor.time_to_regeneration - name: time left - - entity: sensor.clack_water_softener_m3_left - name: m3 left - style: | - ha-card { - border-radius: 20px - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - title: Water softener - - entities: - - entity: sensor.clack_water_softener_ltr_left - max: 3200 - min: 0 - name: L used - height: 8px - decimal: false - positions: - icon: 'off' - indicator: 'off' - tap_action: info - name: 'off' - value: 'off' - style: | - ha-card { - border-radius: 20px - } - .card-content { - padding: 0px 10px 10px 10px; - } - type: custom:bar-card - mode: vertical - type: custom:stack-in-card - - type: conditional - conditions: - - entity: timer.timer_ws_total - state_not: idle - card: - type: entities - style: | - - .card-content { - padding: 8px; - } - .card-content > div { - margin: 0 !important; - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - title: Regen. started - entities: - - conditions: - - entity: timer.timer_ws_backwash - state_not: idle - row: - entity: timer.timer_ws_backwash - icon: mdi:numeric-1-circle - name: 'Cycle: Backwash' - type: conditional - - conditions: - - entity: timer.timer_ws_brine - state_not: idle - row: - entity: timer.timer_ws_brine - icon: mdi:numeric-2-circle - name: 'Cycle: Brine' - type: conditional - - conditions: - - entity: timer.timer_ws_rinse - state_not: idle - row: - entity: timer.timer_ws_rinse - icon: mdi:numeric-3-circle - name: 'Cycle: Rinse' - type: conditional - - conditions: - - entity: timer.timer_ws_fill - state_not: idle - row: - entity: timer.timer_ws_fill - icon: mdi:numeric-4-circle - name: 'Cycle: Fill' - type: conditional - - type: section - - entity: timer.timer_ws_total - icon: mdi:timer-sand - name: Total time left (4 cycles) - - type: entities - entities: - - entity: sensor.clack_water_meter - name: Water meter - - entity: sensor.clack_water_softener_ltr_left - name: Water softener liters left - - entity: sensor.clack_water_softener_m3_left - name: Water softener m3 left - - entity: sensor.clack_salt_level_distance - name: Distance - - entity: sensor.clack_salt_level_height - name: Height - - entity: sensor.clack_salt_level_percent - name: Procent - - entity: sensor.clack_fill_salt - name: Fill salt - - entity: sensor.clack_regenerated_on - name: Regenerated on - - entity: binary_sensor.clack_watermeter_pulse - name: Watermeter pulse - - entity: binary_sensor.clack_regeneration_pulse - name: Regeneration pulse - - entity: button.clack_test_button_use_pulse - name: Test button use pulse - - entity: button.clack_test_button_regen_pulse - name: Test button regeneration pulse - - entity: sensor.clack_power - name: Power - - entity: sensor.clack_voltage - name: Voltage - - entity: sensor.clack_current - name: Current - - entity: switch.clack_chlorinator - name: Chlorinator - - - elements: - - entity: sensor.clack_salt_level_for_dashboard - image: local/images/softener.png - state_image: - '0': local/images/softener0.png - '10': local/images/softener10.png - '20': local/images/softener20.png - '40': local/images/softener40.png - '60': local/images/softener60.png - '80': local/images/softener80.png - '100': local/images/softener100.png - style: - left: 0% - top: 0% - transform: scale(1,1) - tap_action: - action: none - type: image - image: local/images/softener.png - panel: true - type: picture-elements - - type: entities - entities: - - entity: sensor.clack_waterusage_this_quarter - name: Waterusage last quarter - - entity: sensor.clack_waterusage_this_hour - name: Waterusage last hour - - entity: sensor.clack_waterusage_today - name: Waterusage today - - entity: sensor.clack_waterusage_this_month - name: Waterusage this month - - entity: sensor.clack_waterusage_this_year - name: Waterusage this year - - type: custom:apexcharts-card - graph_span: 7d - update_interval: 5m - cache: true - span: - end: day - offset: '-1sec' - header: - show: true - title: Water per day - apex_config: - xaxis: - labels: - format: dd-MM - show: true - showAlways: true - yaxis: - forceNiceScale: true - decimalsInFloat: 0 - min: 0 - chart: - type: area - height: 300 - stroke: - show: true - width: 1 - legend: - show: true - dataLabels: - enabled: false - distributed: true - fill: - type: gradient - gradient: - shadeIntensity: 0.1 - opacityFrom: 0.25 - opacityTo: 1 - inverseColors: true - stops: - - 0 - - 90 - - 100 - series: - - entity: sensor.clack_waterusage_today - name: Usage - type: column - float_precision: 2 - group_by: - func: max - duration: 23h59m59s - - type: entities - entities: - - entity: select.clack_function_mode - name: Function mode - - entity: number.clack_chlorinator_active_time - name: Chlorinator active time - - entity: number.clack_min_salt_distance - name: Min. salt distance - - entity: number.clack_max_salt_distance - name: Max. salt distance - - entity: number.clack_fill_salt_distance - name: Fill salt distance - - entity: number.clack_capacity_in_days - name: Capacity in days - - entity: number.clack_capacity_in_liters - name: Capacity in liters - - entity: sensor.clack_version - name: Version - - entity: sensor.clack_water_softener_ip - name: IP address - - entity: sensor.clack_wifi_signal - name: Wifi signal - - entity: sensor.clack_wifi_signal_db - name: Wifi signal dB - - entity: light.clack_led - name: Led - - entity: sensor.clack_uptime - name: Uptime - title: Settings diff --git a/home_assistant/lovelace_menu_en_backwash2.yaml b/home_assistant/lovelace_menu_en_backwash2.yaml deleted file mode 100644 index f580fef..0000000 --- a/home_assistant/lovelace_menu_en_backwash2.yaml +++ /dev/null @@ -1,273 +0,0 @@ -views: - - title: Watersoftener - path: watersoftener - badges: [] - cards: - - type: vertical-stack - cards: - - cards: - - type: entities - entities: - - entity: sensor.clack_water_meter - type: custom:multiple-entity-row - icon: mdi:cup-water - name: Water softener - secondary_info: - entity: input_select.clack_water_softener_status - name: 'cycle: ' - state_header: used - entities: - - entity: sensor.time_to_regeneration - name: time left - - entity: sensor.clack_water_softener_m3_left - name: m3 left - style: | - ha-card { - border-radius: 20px - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - title: Water softener - - entities: - - entity: sensor.clack_water_softener_ltr_left - max: 3200 - min: 0 - name: L used - height: 8px - decimal: false - positions: - icon: 'off' - indicator: 'off' - tap_action: info - name: 'off' - value: 'off' - style: | - ha-card { - border-radius: 20px - } - .card-content { - padding: 0px 10px 10px 10px; - } - type: custom:bar-card - mode: vertical - type: custom:stack-in-card - - type: conditional - conditions: - - entity: timer.timer_ws_total - state_not: idle - card: - type: entities - style: | - - .card-content { - padding: 8px; - } - .card-content > div { - margin: 0 !important; - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - title: Regen. started - entities: - - conditions: - - entity: timer.timer_ws_backwash - state_not: idle - row: - entity: timer.timer_ws_backwash - icon: mdi:numeric-1-circle - name: 'Cycle: Backwash' - type: conditional - - conditions: - - entity: timer.timer_ws_brine - state_not: idle - row: - entity: timer.timer_ws_brine - icon: mdi:numeric-2-circle - name: 'Cycle: Brine' - type: conditional - - conditions: - - entity: timer.timer_ws_backwash2 - state_not: idle - row: - entity: timer.timer_ws_backwash2 - icon: mdi:numeric-3-circle - name: 'Cycle: Backwash2' - type: conditional - - conditions: - - entity: timer.timer_ws_rinse - state_not: idle - row: - entity: timer.timer_ws_rinse - icon: mdi:numeric-4-circle - name: 'Cycle: Rinse' - type: conditional - - conditions: - - entity: timer.timer_ws_fill - state_not: idle - row: - entity: timer.timer_ws_fill - icon: mdi:numeric-5-circle - name: 'Cycle: Fill' - type: conditional - - type: section - - entity: timer.timer_ws_total - icon: mdi:timer-sand - name: Total time left (5 cycles) - - type: entities - entities: - - entity: sensor.clack_water_meter - name: Water meter - - entity: sensor.clack_water_softener_ltr_left - name: Water softener liters left - - entity: sensor.clack_water_softener_m3_left - name: Water softener m3 left - - entity: sensor.clack_salt_level_distance - name: Distance - - entity: sensor.clack_salt_level_height - name: Height - - entity: sensor.clack_salt_level_percent - name: Procent - - entity: sensor.clack_fill_salt - name: Fill salt - - entity: sensor.clack_regenerated_on - name: Regenerated on - - entity: binary_sensor.clack_watermeter_pulse - name: Watermeter pulse - - entity: binary_sensor.clack_regeneration_pulse - name: Regeneration pulse - - entity: button.clack_test_button_use_pulse - name: Test button use pulse - - entity: button.clack_test_button_regen_pulse - name: Test button regeneration pulse - - entity: sensor.clack_power - name: Power - - entity: sensor.clack_voltage - name: Voltage - - entity: sensor.clack_current - name: Current - - entity: switch.clack_chlorinator - name: Chlorinator - - - elements: - - entity: sensor.clack_salt_level_for_dashboard - image: local/images/softener.png - state_image: - '0': local/images/softener0.png - '10': local/images/softener10.png - '20': local/images/softener20.png - '40': local/images/softener40.png - '60': local/images/softener60.png - '80': local/images/softener80.png - '100': local/images/softener100.png - style: - left: 0% - top: 0% - transform: scale(1,1) - tap_action: - action: none - type: image - image: local/images/softener.png - panel: true - type: picture-elements - - type: entities - entities: - - entity: sensor.clack_waterusage_this_quarter - name: Waterusage last quarter - - entity: sensor.clack_waterusage_this_hour - name: Waterusage last hour - - entity: sensor.clack_waterusage_today - name: Waterusage today - - entity: sensor.clack_waterusage_this_month - name: Waterusage this month - - entity: sensor.clack_waterusage_this_year - name: Waterusage this year - - type: custom:apexcharts-card - graph_span: 7d - update_interval: 5m - cache: true - span: - end: day - offset: '-1sec' - header: - show: true - title: Water per day - apex_config: - xaxis: - labels: - format: dd-MM - show: true - showAlways: true - yaxis: - forceNiceScale: true - decimalsInFloat: 0 - min: 0 - chart: - type: area - height: 300 - stroke: - show: true - width: 1 - legend: - show: true - dataLabels: - enabled: false - distributed: true - fill: - type: gradient - gradient: - shadeIntensity: 0.1 - opacityFrom: 0.25 - opacityTo: 1 - inverseColors: true - stops: - - 0 - - 90 - - 100 - series: - - entity: sensor.clack_waterusage_today - name: Usage - type: column - float_precision: 2 - group_by: - func: max - duration: 23h59m59s - - type: entities - entities: - - entity: select.clack_function_mode - name: Function mode - - entity: number.clack_chlorinator_active_time - name: Chlorinator active time - - entity: number.clack_min_salt_distance - name: Min. salt distance - - entity: number.clack_max_salt_distance - name: Max. salt distance - - entity: number.clack_fill_salt_distance - name: Fill salt distance - - entity: number.clack_capacity_in_days - name: Capacity in days - - entity: number.clack_capacity_in_liters - name: Capacity in liters - - entity: sensor.clack_version - name: Version - - entity: sensor.clack_water_softener_ip - name: IP address - - entity: sensor.clack_wifi_signal - name: Wifi signal - - entity: sensor.clack_wifi_signal_db - name: Wifi signal dB - - entity: light.clack_led - name: Led - - entity: sensor.clack_uptime - name: Uptime - title: Settings diff --git a/home_assistant/lovelace_menu_nl.yaml b/home_assistant/lovelace_menu_nl.yaml deleted file mode 100644 index b6eb182..0000000 --- a/home_assistant/lovelace_menu_nl.yaml +++ /dev/null @@ -1,257 +0,0 @@ -views: - - title: Ontharder - path: ontharder - badges: [] - cards: - - type: vertical-stack - cards: - - cards: - - type: entities - entities: - - entity: sensor.clack_watermeter - type: custom:multiple-entity-row - icon: mdi:cup-water - name: Water ontharder - secondary_info: - entity: input_select.clack_water_softener_status - name: 'cyclus: ' - state_header: verbr. - entities: - - entity: sensor.tijd_tot_regeneratie - name: nog dag - - entity: sensor.clack_waterontharder_m3_over - name: nog m3 - style: | - ha-card { - border-radius: 20px - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - title: Water ontharder - - entities: - - entity: sensor.clack_waterontharder_ltr_over - max: 3200 - min: 0 - name: Ltr gebruikt - height: 8px - decimal: false - positions: - icon: 'off' - indicator: 'off' - tap_action: info - name: 'off' - value: 'off' - style: | - ha-card { - border-radius: 20px - } - .card-content { - padding: 0px 10px 10px 10px; - } - type: custom:bar-card - mode: vertical - type: custom:stack-in-card - - type: conditional - conditions: - - entity: timer.timer_ws_total - state_not: idle - card: - type: entities - style: | - - .card-content { - padding: 8px; - } - .card-content > div { - margin: 0 !important; - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - .card-header { - font-size: 18px; - padding: 5px 25px; - font-weight: bold; - } - title: Regen. gestart - entities: - - conditions: - - entity: timer.timer_ws_backwash - state_not: idle - row: - entity: timer.timer_ws_backwash - icon: mdi:numeric-1-circle - name: 'Cyclus: terugspoelen' - type: conditional - - conditions: - - entity: timer.timer_ws_brine - state_not: idle - row: - entity: timer.timer_ws_brine - icon: mdi:numeric-2-circle - name: 'Cyclus: zoutspoeling' - type: conditional - - conditions: - - entity: timer.timer_ws_rinse - state_not: idle - row: - entity: timer.timer_ws_rinse - icon: mdi:numeric-4-circle - name: 'Cyclus: snelspoeling' - type: conditional - - conditions: - - entity: timer.timer_ws_fill - state_not: idle - row: - entity: timer.timer_ws_fill - icon: mdi:numeric-5-circle - name: 'Cyclus: vullen' - type: conditional - - type: section - - entity: timer.timer_ws_total - icon: mdi:timer-sand - name: Totale tijd over (4 cycles) - - type: entities - entities: - - entity: sensor.clack_watermeter - name: Watermeter - - entity: sensor.clack_waterontharder_ltr_over - name: Waterontharder ltr over - - entity: sensor.clack_waterontharder_m3_over - name: Waterontharder m3 over - - entity: sensor.clack_zoutniveau_afstand - name: Afstand - - entity: sensor.clack_zoutniveau_hoogte - name: Hoogte - - entity: sensor.clack_zoutniveau_procent - name: Procent - - entity: sensor.clack_zout_bijvullen - name: Zout bijvullen - - entity: sensor.clack_geregenereerd_op - name: Geregenereerd op - - entity: binary_sensor.clack_watermeter_pulse - name: Watermeter pulse - - entity: binary_sensor.clack_regeneratie_pulse - name: Regeneratie pulse - - entity: button.clack_test_button_use_pulse - name: Test button verbruik pulse - - entity: button.clack_test_button_regen_pulse - name: Test button regeneratie pulse - - entity: sensor.clack_power - name: Power - - entity: sensor.clack_voltage - name: Spanning - - entity: sensor.clack_current - name: Stroom - - elements: - - entity: sensor.clack_zoutniveau_voor_dashboard - image: local/images/softener.png - state_image: - '0': local/images/softener0.png - '10': local/images/softener10.png - '20': local/images/softener20.png - '40': local/images/softener40.png - '60': local/images/softener60.png - '80': local/images/softener80.png - '100': local/images/softener100.png - style: - left: 0% - top: 0% - transform: scale(1,1) - tap_action: - action: none - type: image - image: local/images/softener.png - panel: true - type: picture-elements - - type: entities - entities: - - entity: sensor.clack_waterverbruik_dit_kwartier - - entity: sensor.clack_waterverbruik_dit_uur - - entity: sensor.clack_waterverbruik_vandaag - - entity: sensor.clack_waterverbruik_maand - - entity: sensor.clack_waterverbruik_jaar - - type: custom:apexcharts-card - graph_span: 7d - update_interval: 5m - cache: true - span: - end: day - offset: '-1sec' - header: - show: true - title: Water per dag - apex_config: - xaxis: - labels: - format: dd-MM - show: true - showAlways: true - yaxis: - forceNiceScale: true - decimalsInFloat: 0 - min: 0 - chart: - type: area - height: 300 - stroke: - show: true - width: 1 - legend: - show: true - dataLabels: - enabled: false - distributed: true - fill: - type: gradient - gradient: - shadeIntensity: 0.1 - opacityFrom: 0.25 - opacityTo: 1 - inverseColors: true - stops: - - 0 - - 90 - - 100 - series: - - entity: sensor.clack_waterverbruik_vandaag - name: Verbruik - type: column - float_precision: 2 - group_by: - func: max - duration: 23h59m59s - - type: entities - entities: - - entity: select.clack_functie_mode - name: Functie mode - - entity: number.clack_chlorinator_aktief_tijd - name: Chlorinator aktief tijd - - entity: number.clack_min_afstand_zout - name: Min. afstand zout - - entity: number.clack_max_afstand_zout - name: Max. afstand zout - - entity: number.clack_zout_bijvullen_afstand - name: Bijvullen afstand zout - - entity: number.clack_capaciteit_in_dagen - name: Capaciteit in dagen - - entity: number.clack_capaciteit_in_liters - name: Capaciteit in liters - - entity: sensor.clack_versie - name: Versie - - entity: sensor.clack_waterontharder_ip - name: IP adres - - entity: sensor.clack_wifi_signal - name: Wifi signaal - - entity: sensor.clack_wifi_signal_db - name: Wifi signaal db - - entity: light.clack_led - name: Led - - entity: sensor.clack_uptime - name: Uptime - title: Instellingen \ No newline at end of file