2022-05-23 17:52:46 +00:00
|
|
|
esphome:
|
|
|
|
name: a3pool
|
|
|
|
board: nodemcuv2
|
|
|
|
platform: ESP8266
|
|
|
|
|
|
|
|
ota:
|
|
|
|
password: !secret a3poolpasswd
|
|
|
|
|
|
|
|
api:
|
|
|
|
password: !secret a3poolpasswd
|
|
|
|
encryption:
|
|
|
|
key: !secret a3poolkey
|
|
|
|
|
|
|
|
logger:
|
|
|
|
|
|
|
|
wifi:
|
|
|
|
ssid: !secret wifi_ssid
|
|
|
|
password: !secret wifi_password
|
|
|
|
fast_connect: true
|
|
|
|
|
|
|
|
mqtt:
|
|
|
|
broker: !secret mqtt_broker_2
|
|
|
|
client_id: "A3 Pool"
|
|
|
|
|
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: 12
|
|
|
|
inverted: true
|
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
|
|
|
id: pump_state
|
|
|
|
|
|
|
|
switch:
|
|
|
|
- platform: gpio
|
|
|
|
pin: 5
|
|
|
|
id: relay
|
|
|
|
on_turn_on:
|
|
|
|
- delay: 500ms
|
|
|
|
- switch.turn_off: relay
|
|
|
|
- platform: template
|
|
|
|
name: "Automate Control"
|
|
|
|
optimistic: true
|
|
|
|
restore_state: true
|
|
|
|
|
|
|
|
- platform: template
|
|
|
|
optimistic: false
|
|
|
|
name: pump
|
2022-06-28 09:37:19 +00:00
|
|
|
id: pump
|
2022-05-23 17:52:46 +00:00
|
|
|
lambda: |-
|
|
|
|
if (id(pump_state).state) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
turn_on_action:
|
|
|
|
- if:
|
|
|
|
condition:
|
|
|
|
lambda: 'return id(pump_state).state == false;'
|
|
|
|
then:
|
|
|
|
- switch.turn_on: relay
|
|
|
|
- delay: 500ms
|
|
|
|
- switch.turn_off: relay
|
|
|
|
turn_off_action:
|
|
|
|
- if:
|
|
|
|
condition:
|
|
|
|
lambda: 'return id(pump_state).state;'
|
|
|
|
then:
|
|
|
|
- switch.turn_on: relay
|
|
|
|
- delay: 500ms
|
|
|
|
- switch.turn_off: relay
|
|
|
|
|
2022-06-28 09:37:19 +00:00
|
|
|
time:
|
|
|
|
timezone: "Europe/Vienna"
|
|
|
|
id: a3poolTime
|
|
|
|
platform: sntp
|
|
|
|
on_time:
|
|
|
|
- seconds: 0
|
|
|
|
minutes: 0
|
|
|
|
hours: 8
|
|
|
|
months: 5-10
|
|
|
|
then:
|
|
|
|
- switch.turn_on: pump
|
|
|
|
- seconds: 0
|
|
|
|
minutes: 0
|
|
|
|
hours: 8
|
|
|
|
months: 5-10
|
|
|
|
then:
|
|
|
|
- switch.turn_off: pump
|
|
|
|
|
2022-05-23 17:52:46 +00:00
|
|
|
dallas:
|
|
|
|
- pin: D4
|
|
|
|
update_interval: 10s
|
|
|
|
sensor:
|
|
|
|
- platform: dallas
|
|
|
|
address: 0xd1000007494b3628
|
|
|
|
name: "Pool Temperature"
|
|
|
|
- platform: dallas
|
|
|
|
address: 0x440000073de2e728
|
|
|
|
name: "Solar Temperature"
|
|
|
|
|