Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INFO ESPHome 2025.5.0
- INFO Reading configuration /config/esphome/esp-swimming-pool.yaml...
- INFO Detected timezone 'Europe/Lisbon'
- substitutions:
- device_name: esp-swimming-pool
- device_internal_name: esp_swimming_pool
- device_friendly_name: ESP Swimming Pool
- device_comment: Monitors the Swimming Pool Temperature and Controls Motor Pump
- device_ip_address: 192.168.xx.xx
- device_sampling_time: 30s
- project_owner: joaopedros2
- project_version: '1'
- region: Europe/Lisbon
- esphome:
- project:
- name: joaopedros2.ESP32-DevKitC-V4
- version: '1'
- name: esp-swimming-pool
- friendly_name: ESP Swimming Pool
- comment: Monitors the Swimming Pool Temperature and Controls Motor Pump
- on_boot:
- - priority: 600.0
- then:
- - ds1307.read_time: {}
- - delay: 5s
- - if:
- condition:
- lambda: !lambda |-
- auto now = id(esp_swimming_pool_ds1307_time).now();
- auto timer1_start = id(esp_swimming_pool_timer_1_start).state_as_esptime();
- auto timer1_stop = id(esp_swimming_pool_timer_1_stop).state_as_esptime();
- auto timer2_start = id(esp_swimming_pool_timer_2_start).state_as_esptime();
- auto timer2_stop = id(esp_swimming_pool_timer_2_stop).state_as_esptime();
- auto timer3_start = id(esp_swimming_pool_timer_3_start).state_as_esptime();
- auto timer3_stop = id(esp_swimming_pool_timer_3_stop).state_as_esptime();
- bool within_timer1 = id(esp_swimming_pool_timer_1_active).state &&
- (now.hour > timer1_start.hour || (now.hour == timer1_start.hour && now.minute >= timer1_start.minute)) &&
- (now.hour < timer1_stop.hour || (now.hour == timer1_stop.hour && now.minute <= timer1_stop.minute));
- bool within_timer2 = id(esp_swimming_pool_timer_2_active).state &&
- (now.hour > timer2_start.hour || (now.hour == timer2_start.hour && now.minute >= timer2_start.minute)) &&
- (now.hour < timer2_stop.hour || (now.hour == timer2_stop.hour && now.minute <= timer2_stop.minute));
- bool within_timer3 = id(esp_swimming_pool_timer_3_active).state &&
- (now.hour > timer3_start.hour || (now.hour == timer3_start.hour && now.minute >= timer3_start.minute)) &&
- (now.hour < timer3_stop.hour || (now.hour == timer3_stop.hour && now.minute <= timer3_stop.minute));
- return within_timer1 || within_timer2 || within_timer3;
- then:
- - switch.turn_on:
- id: esp_swimming_pool_motor_switch
- else:
- - switch.turn_off:
- id: esp_swimming_pool_motor_switch
- min_version: 2025.5.0
- build_path: build/esp-swimming-pool
- area: ''
- platformio_options: {}
- includes: []
- libraries: []
- name_add_mac_suffix: false
- debug_scheduler: false
- esp32:
- board: az-delivery-devkit-v4
- flash_size: 4MB
- framework:
- version: 2.0.5
- advanced:
- ignore_efuse_custom_mac: false
- source: ~3.20005.0
- type: arduino
- variant: ESP32
- cpu_frequency: 160MHZ
- preferences:
- flash_write_interval: 10min
- logger:
- level: INFO
- baud_rate: 115200
- tx_buffer_size: 512
- deassert_rts_dtr: false
- task_log_buffer_size: 768
- hardware_uart: UART0
- logs: {}
- i2c:
- - id: esp_swimming_pool_i2c
- sda: 21
- scl: 22
- scan: false
- frequency: 400000.0
- sensor:
- - platform: internal_temperature
- id: esp_swimming_pool_internal_temperature
- name: Internal Temperature
- icon: mdi:thermometer
- unit_of_measurement: °C
- device_class: temperature
- state_class: measurement
- update_interval: 30s
- disabled_by_default: true
- force_update: false
- accuracy_decimals: 1
- entity_category: diagnostic
- - platform: uptime
- id: esp_swimming_pool_uptime_sensor
- name: Uptime Sensor
- update_interval: 30s
- internal: true
- disabled_by_default: false
- force_update: false
- unit_of_measurement: s
- icon: mdi:timer-outline
- accuracy_decimals: 0
- device_class: duration
- state_class: total_increasing
- entity_category: diagnostic
- type: seconds
- - platform: wifi_signal
- id: esp_swimming_pool_wifi_rssi
- name: WiFi RSSI
- icon: mdi:wifi
- update_interval: 30s
- entity_category: diagnostic
- disabled_by_default: false
- force_update: false
- unit_of_measurement: dBm
- accuracy_decimals: 0
- device_class: signal_strength
- state_class: measurement
- - platform: inkbird_ibsth1_mini
- mac_address: 49:24:03:27:01:6C
- temperature:
- id: esp_swimming_pool_inkbird_ibs_p01b_temperature
- name: Inkbird IBS-P01B Temperature
- device_class: temperature
- disabled_by_default: false
- force_update: false
- unit_of_measurement: °C
- accuracy_decimals: 1
- state_class: measurement
- battery_level:
- id: esp_swimming_pool_inkbird_ibs_p01b_battery
- name: Inkbird IBS-P01B Battery
- accuracy_decimals: 0
- device_class: battery
- disabled_by_default: false
- force_update: false
- unit_of_measurement: '%'
- state_class: measurement
- entity_category: diagnostic
- api:
- id: esp_swimming_pool_ha_api
- encryption:
- key: xxx
- reboot_timeout: 0s
- port: 6053
- password: ''
- ota:
- - platform: esphome
- password: ksmdye
- version: 2
- port: 3232
- safe_mode:
- disabled: false
- reboot_timeout: 10min
- num_attempts: 5
- boot_is_good_after: 1min
- mdns:
- disabled: false
- services: []
- network:
- enable_ipv6: false
- min_ipv6_addr_count: 0
- binary_sensor:
- - platform: status
- id: esp_swimming_pool_status
- name: Status
- icon: mdi:network-pos
- device_class: connectivity
- entity_category: diagnostic
- disabled_by_default: false
- - platform: gpio
- id: esp_swimming_pool_engine_state
- name: Engine State
- icon: mdi:engine
- pin:
- number: 23
- inverted: true
- mode:
- input: true
- pullup: true
- output: false
- open_drain: false
- pulldown: false
- ignore_pin_validation_error: false
- ignore_strapping_warning: false
- drive_strength: 20.0
- filters:
- - delayed_on_off: 50ms
- device_class: power
- disabled_by_default: false
- text_sensor:
- - platform: version
- id: esp_swimming_pool_esphome_version
- name: ESPHome Version
- icon: mdi:package
- hide_timestamp: true
- entity_category: diagnostic
- disabled_by_default: true
- - platform: template
- id: esp_swimming_pool_uptime
- name: Uptime
- icon: mdi:clock-start
- lambda: !lambda |-
- int seconds = (id(esp_swimming_pool_uptime_sensor).state);
- int days = seconds / (24 * 3600);
- seconds = seconds % (24 * 3600);
- int hours = seconds / 3600;
- seconds = seconds % 3600;
- int minutes = seconds / 60;
- seconds = seconds % 60;
- if ( days > 3650 ) {
- return { "Starting up" };
- } else if ( days ) {
- return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
- } else if ( hours ) {
- return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() };
- } else if ( minutes ) {
- return { (String(minutes) +"m "+ String(seconds) +"s").c_str() };
- } else {
- return { (String(seconds) +"s").c_str() };
- }
- update_interval: 30s
- entity_category: diagnostic
- disabled_by_default: false
- - platform: wifi_info
- ip_address:
- id: esp_swimming_pool_ip_address
- name: IP Address
- icon: mdi:ip-network
- entity_category: diagnostic
- disabled_by_default: false
- update_interval: 1s
- ssid:
- id: esp_swimming_pool_connected_ssid
- name: Connected SSID
- icon: mdi:access-point
- entity_category: diagnostic
- disabled_by_default: false
- update_interval: 1s
- mac_address:
- id: esp_swimming_pool_mac_address
- name: Mac WiFi Address
- icon: mdi:network-outline
- entity_category: diagnostic
- disabled_by_default: true
- dns_address:
- id: esp_swimming_pool_dns_address
- name: DNS Address
- icon: mdi:dns
- entity_category: diagnostic
- disabled_by_default: true
- update_interval: 1s
- - platform: template
- name: Motor Status
- id: esp_swimming_pool_motor_status
- icon: mdi:engine
- lambda: !lambda |-
- if (id(esp_swimming_pool_motor_switch).state && id(esp_swimming_pool_engine_state).state) {
- return {"Auto On"};
- } else if (id(esp_swimming_pool_motor_switch).state && !id(esp_swimming_pool_engine_state).state) {
- return {"Standby"};
- } else if (!id(esp_swimming_pool_motor_switch).state && id(esp_swimming_pool_engine_state).state) {
- return {"Manual On"};
- } else {
- return {"Off"};
- }
- update_interval: 1s
- disabled_by_default: false
- button:
- - platform: restart
- id: esp_swimming_pool_device_restart
- name: Restart
- icon: mdi:restart
- disabled_by_default: false
- entity_category: config
- device_class: restart
- - platform: safe_mode
- id: esp_swimming_pool_device_safe_mode
- name: Use Safe Mode
- icon: mdi:restart-alert
- disabled_by_default: true
- entity_category: config
- device_class: restart
- - platform: shutdown
- id: esp_swimming_pool_device_shutdown
- name: Shutdown
- icon: mdi:power
- disabled_by_default: true
- entity_category: config
- wifi:
- networks:
- - ssid: xxx
- password: xxx
- priority: 0.0
- manual_ip:
- static_ip: 192.168.xx.xxx
- gateway: 192.168.xx.xxx
- subnet: 255.255.252.0
- dns1: 192.168.xx.xxx
- dns2: 8.8.8.8
- domain: .local
- fast_connect: true
- ap:
- ssid: esp-swimming-pool
- password: xxx
- ap_timeout: 1min
- reboot_timeout: 15min
- power_save_mode: LIGHT
- passive_scan: false
- enable_on_boot: true
- use_address: 192.168.xx.xxx
- captive_portal: {}
- web_server:
- port: 80
- version: 3
- include_internal: true
- auth:
- username: xxx
- password: xxx
- local: true
- enable_private_network_access: true
- ota: true
- log: true
- css_url: ''
- js_url: https://oi.esphome.io/v3/www.js
- esp32_ble:
- id: esp_swimming_pool_ble
- enable_on_boot: true
- io_capability: none
- advertising_cycle_time: 10s
- esp32_ble_tracker:
- id: esp_swimming_pool_ble_tracker
- scan_parameters:
- interval: 1100ms
- window: 1100ms
- active: true
- continuous: true
- duration: 5min
- max_connections: 3
- software_coexistence: true
- bluetooth_proxy:
- id: esp_swimming_pool_ble_proxy
- active: true
- connection_slots: 3
- connections:
- - {}
- - {}
- - {}
- time:
- - platform: ds1307
- id: esp_swimming_pool_ds1307_time
- update_interval: 4294967295
- timezone: WET0WEST,M3.5.0/1,M10.5.0
- address: 0x68
- - platform: sntp
- id: esp_swimming_pool_sntp_time
- timezone: WET0WEST,M3.5.0/1,M10.5.0
- on_time_sync:
- - then:
- - ds1307.write_time: {}
- update_interval: 15min
- servers:
- - 0.pool.ntp.org
- - 1.pool.ntp.org
- - 2.pool.ntp.org
- switch:
- - platform: gpio
- id: esp_swimming_pool_motor_switch
- name: Motor Switch
- icon: mdi:engine
- pin:
- number: 18
- mode:
- output: true
- input: false
- open_drain: false
- pullup: false
- pulldown: false
- inverted: false
- ignore_pin_validation_error: false
- ignore_strapping_warning: false
- drive_strength: 20.0
- inverted: true
- restore_mode: RESTORE_DEFAULT_OFF
- disabled_by_default: false
- entity_category: config
- interlock_wait_time: 0ms
- - platform: gpio
- id: esp_swimming_pool_lights
- name: Lights Switch
- icon: mdi:lightbulb-group
- pin:
- number: 19
- mode:
- output: true
- input: false
- open_drain: false
- pullup: false
- pulldown: false
- inverted: false
- ignore_pin_validation_error: false
- ignore_strapping_warning: false
- drive_strength: 20.0
- inverted: true
- restore_mode: RESTORE_DEFAULT_OFF
- disabled_by_default: false
- entity_category: config
- interlock_wait_time: 0ms
- - platform: template
- id: esp_swimming_pool_timer_1_active
- name: Timer 1 Active
- icon: mdi:progress-clock
- optimistic: true
- restore_mode: RESTORE_DEFAULT_OFF
- disabled_by_default: false
- entity_category: config
- assumed_state: false
- - platform: template
- id: esp_swimming_pool_timer_2_active
- name: Timer 2 Active
- icon: mdi:progress-clock
- optimistic: true
- restore_mode: RESTORE_DEFAULT_OFF
- disabled_by_default: false
- entity_category: config
- assumed_state: false
- - platform: template
- id: esp_swimming_pool_timer_3_active
- name: Timer 3 Active
- icon: mdi:progress-clock
- optimistic: true
- restore_mode: RESTORE_DEFAULT_OFF
- disabled_by_default: false
- entity_category: config
- assumed_state: false
- - platform: template
- id: esp_swimming_pool_temperature_automation
- name: Temperature Automation
- icon: mdi:thermometer-auto
- optimistic: true
- restore_mode: RESTORE_DEFAULT_OFF
- disabled_by_default: false
- entity_category: config
- assumed_state: false
- number:
- - platform: template
- id: esp_swimming_pool_temperature_trigger
- name: Temperature Trigger
- unit_of_measurement: °C
- device_class: temperature
- optimistic: true
- restore_value: true
- initial_value: 17.5
- min_value: -5.0
- max_value: 40.0
- step: 0.1
- mode: BOX
- disabled_by_default: false
- entity_category: config
- update_interval: 60s
- datetime:
- - platform: template
- id: esp_swimming_pool_timer_1_start
- name: Timer 1 Start
- icon: mdi:clock-start
- optimistic: true
- initial_value:
- hour: 9
- minute: 0
- second: 0
- restore_value: true
- disabled_by_default: false
- entity_category: config
- on_time:
- - then:
- - if:
- condition:
- switch.is_on:
- id: esp_swimming_pool_timer_1_active
- then:
- - switch.turn_on:
- id: esp_swimming_pool_motor_switch
- type: TIME
- update_interval: 60s
- - platform: template
- id: esp_swimming_pool_timer_1_stop
- name: Timer 1 Stop
- icon: mdi:clock-end
- optimistic: true
- initial_value:
- hour: 10
- minute: 0
- second: 0
- restore_value: true
- disabled_by_default: false
- entity_category: config
- on_time:
- - then:
- - if:
- condition:
- switch.is_on:
- id: esp_swimming_pool_timer_1_active
- then:
- - switch.turn_off:
- id: esp_swimming_pool_motor_switch
- type: TIME
- update_interval: 60s
- - platform: template
- id: esp_swimming_pool_timer_2_start
- name: Timer 2 Start
- icon: mdi:clock-start
- optimistic: true
- initial_value:
- hour: 14
- minute: 0
- second: 0
- restore_value: true
- disabled_by_default: false
- entity_category: config
- on_time:
- - then:
- - if:
- condition:
- switch.is_on:
- id: esp_swimming_pool_timer_2_active
- then:
- - switch.turn_on:
- id: esp_swimming_pool_motor_switch
- type: TIME
- update_interval: 60s
- - platform: template
- id: esp_swimming_pool_timer_2_stop
- name: Timer 2 Stop
- icon: mdi:clock-end
- optimistic: true
- initial_value:
- hour: 16
- minute: 0
- second: 0
- restore_value: true
- disabled_by_default: false
- entity_category: config
- on_time:
- - then:
- - if:
- condition:
- switch.is_on:
- id: esp_swimming_pool_timer_2_active
- then:
- - switch.turn_off:
- id: esp_swimming_pool_motor_switch
- type: TIME
- update_interval: 60s
- - platform: template
- id: esp_swimming_pool_timer_3_start
- name: Timer 3 Start
- icon: mdi:clock-start
- optimistic: true
- initial_value:
- hour: 19
- minute: 0
- second: 0
- restore_value: true
- disabled_by_default: false
- entity_category: config
- on_time:
- - then:
- - if:
- condition:
- switch.is_on:
- id: esp_swimming_pool_timer_3_active
- then:
- - switch.turn_on:
- id: esp_swimming_pool_motor_switch
- type: TIME
- update_interval: 60s
- - platform: template
- id: esp_swimming_pool_timer_3_stop
- name: Timer 3 Stop
- icon: mdi:clock-end
- optimistic: true
- initial_value:
- hour: 20
- minute: 0
- second: 0
- restore_value: true
- disabled_by_default: false
- entity_category: config
- on_time:
- - then:
- - if:
- condition:
- switch.is_on:
- id: esp_swimming_pool_timer_3_active
- then:
- - switch.turn_off:
- id: esp_swimming_pool_motor_switch
- type: TIME
- update_interval: 60s
- select:
- - platform: template
- id: esp_swimming_pool_schedule
- name: Schedule
- icon: mdi:sun-snowflake-variant
- options:
- - summer
- - winter
- initial_option: summer
- optimistic: true
- restore_value: true
- disabled_by_default: false
- entity_category: config
- update_interval: 60s
- INFO Configuration is valid!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement