updating configuration
This commit is contained in:
@@ -1,8 +1,16 @@
|
|||||||
|
# ----------- User configutaion ------------------
|
||||||
|
substitutions:
|
||||||
|
devicename: airfresher
|
||||||
|
upper_devicename: Airfresher
|
||||||
|
fresh_motor_pin: D1
|
||||||
|
remain_init: '2000'
|
||||||
|
# ----------- /User configutaion ------------------
|
||||||
|
|
||||||
# Need to turn off logging because senseair uses uart and have conflicts with logging
|
# Need to turn off logging because senseair uses uart and have conflicts with logging
|
||||||
logger:
|
logger:
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
name: airfresher
|
name: $devicename
|
||||||
platform: ESP8266
|
platform: ESP8266
|
||||||
board: d1_mini
|
board: d1_mini
|
||||||
|
|
||||||
@@ -12,11 +20,12 @@ wifi:
|
|||||||
|
|
||||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
ap:
|
ap:
|
||||||
ssid: "Airfresher Fallback Hotspot"
|
ssid: "$upper_devicename Fallback Hotspot"
|
||||||
password: !secret esphome_captive_pass
|
password: !secret esphome_captive_pass
|
||||||
|
|
||||||
captive_portal:
|
captive_portal:
|
||||||
|
|
||||||
|
|
||||||
# Enable Home Assistant API
|
# Enable Home Assistant API
|
||||||
api:
|
api:
|
||||||
password: !secret esphome_pass
|
password: !secret esphome_pass
|
||||||
@@ -29,14 +38,14 @@ globals:
|
|||||||
- id: remain
|
- id: remain
|
||||||
type: int
|
type: int
|
||||||
restore_value: yes
|
restore_value: yes
|
||||||
initial_value: '2000'
|
initial_value: $remain_init
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: uptime
|
- platform: uptime
|
||||||
name: Airfresher Uptime
|
name: "$upper_devicename Uptime"
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "Airfresher Remain"
|
name: "$upper_devicename Remain"
|
||||||
icon: "mdi:battery-80"
|
icon: "mdi:battery-80"
|
||||||
lambda: |-
|
lambda: |-
|
||||||
return id(remain);
|
return id(remain);
|
||||||
@@ -44,11 +53,11 @@ sensor:
|
|||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin: D1
|
pin: $fresh_motor_pin
|
||||||
id: fresh_motor
|
id: fresh_motor
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "Airfresher fresh"
|
name: "$upper_devicename fresh"
|
||||||
icon: "mdi:air-humidifier"
|
icon: "mdi:air-humidifier"
|
||||||
turn_on_action:
|
turn_on_action:
|
||||||
- lambda: 'id(remain) -= 1;'
|
- lambda: 'id(remain) -= 1;'
|
||||||
@@ -57,7 +66,7 @@ switch:
|
|||||||
- switch.turn_off: fresh_motor
|
- switch.turn_off: fresh_motor
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "Airfresher reset"
|
name: "$upper_devicename reset"
|
||||||
icon: "mdi:backup-restore"
|
icon: "mdi:backup-restore"
|
||||||
turn_on_action:
|
turn_on_action:
|
||||||
- lambda: 'id(remain) = 2000;'
|
- lambda: 'id(remain) = 2000;'
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
############# User configuration #############
|
# ----------- User configutaion ------------------
|
||||||
substitutions:
|
substitutions:
|
||||||
|
devicename: domofon
|
||||||
|
upper_devicename: Domofon
|
||||||
call_sensor_pin: "14"
|
call_sensor_pin: "14"
|
||||||
trubka_pin: "13"
|
trubka_pin: "13"
|
||||||
door_pin: "12"
|
door_pin: "12"
|
||||||
|
# ----------- /User configutaion ------------------
|
||||||
board_name: domofon
|
|
||||||
########### End user configuration ###########
|
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
name: $board_name
|
name: $devicename
|
||||||
platform: ESP8266
|
platform: ESP8266
|
||||||
board: d1_mini
|
board: d1_mini
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ wifi:
|
|||||||
|
|
||||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
ap:
|
ap:
|
||||||
ssid: "Domofon Fallback Hotspot"
|
ssid: "$upper_devicename Fallback Hotspot"
|
||||||
password: !secret esphome_captive_pass
|
password: !secret esphome_captive_pass
|
||||||
|
|
||||||
captive_portal:
|
captive_portal:
|
||||||
@@ -38,7 +38,7 @@ binary_sensor:
|
|||||||
number: $call_sensor_pin
|
number: $call_sensor_pin
|
||||||
mode: INPUT_PULLUP
|
mode: INPUT_PULLUP
|
||||||
inverted: true
|
inverted: true
|
||||||
name: "Domofon incoming call"
|
name: "$upper_devicename incoming call"
|
||||||
id: incoming_call
|
id: incoming_call
|
||||||
device_class: lock
|
device_class: lock
|
||||||
filters:
|
filters:
|
||||||
@@ -49,7 +49,7 @@ binary_sensor:
|
|||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: uptime
|
- platform: uptime
|
||||||
name: Domofon Uptime
|
name: "$upper_devicename Uptime"
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
@@ -66,7 +66,7 @@ switch:
|
|||||||
|
|
||||||
# Automatically open door switch
|
# Automatically open door switch
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "Domofon automatically open"
|
name: "$upper_devicename automatically open"
|
||||||
id: auto_open
|
id: auto_open
|
||||||
icon: "mdi:door-open"
|
icon: "mdi:door-open"
|
||||||
optimistic: true
|
optimistic: true
|
||||||
@@ -76,7 +76,7 @@ switch:
|
|||||||
|
|
||||||
# Automatically open door once switch
|
# Automatically open door once switch
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "Domofon automatically open once"
|
name: "$upper_devicename automatically open once"
|
||||||
id: auto_open_once
|
id: auto_open_once
|
||||||
icon: "mdi:door-open"
|
icon: "mdi:door-open"
|
||||||
optimistic: true
|
optimistic: true
|
||||||
@@ -85,7 +85,7 @@ switch:
|
|||||||
- switch.turn_off: auto_open
|
- switch.turn_off: auto_open
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "Domofon force open"
|
name: "$upper_devicename force open"
|
||||||
id: open_force
|
id: open_force
|
||||||
icon: "mdi:door-open"
|
icon: "mdi:door-open"
|
||||||
turn_on_action:
|
turn_on_action:
|
||||||
|
|||||||
@@ -1,8 +1,22 @@
|
|||||||
|
# ----------- User configutaion ------------------
|
||||||
|
substitutions:
|
||||||
|
devicename: domofon
|
||||||
|
upper_devicename: Domofon
|
||||||
|
pin_cold: D1
|
||||||
|
init_cold: '210.29'
|
||||||
|
pin_hot: D2
|
||||||
|
init_hot: '109.74'
|
||||||
|
water_open_pin: D5
|
||||||
|
water_close_pin: D3
|
||||||
|
ultrasonic_echo_pin: D6
|
||||||
|
ultrasonic_trig_pin: D7
|
||||||
|
# ----------- /User configutaion ------------------
|
||||||
|
|
||||||
# Need to turn off logging because senseair uses uart and have conflicts with logging
|
# Need to turn off logging because senseair uses uart and have conflicts with logging
|
||||||
logger:
|
logger:
|
||||||
|
|
||||||
esphome:
|
esphome:
|
||||||
name: watercontrol
|
name: $devicename
|
||||||
platform: ESP8266
|
platform: ESP8266
|
||||||
board: d1_mini
|
board: d1_mini
|
||||||
|
|
||||||
@@ -12,7 +26,7 @@ wifi:
|
|||||||
|
|
||||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
ap:
|
ap:
|
||||||
ssid: "Watercontrol Fallback Hotspot"
|
ssid: "$upper_devicename Fallback Hotspot"
|
||||||
password: !secret esphome_captive_pass
|
password: !secret esphome_captive_pass
|
||||||
|
|
||||||
captive_portal:
|
captive_portal:
|
||||||
@@ -24,7 +38,6 @@ api:
|
|||||||
ota:
|
ota:
|
||||||
password: !secret esphome_pass
|
password: !secret esphome_pass
|
||||||
|
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: water_state
|
- id: water_state
|
||||||
type: bool
|
type: bool
|
||||||
@@ -33,17 +46,17 @@ globals:
|
|||||||
- id: counter_cold_value
|
- id: counter_cold_value
|
||||||
type: float
|
type: float
|
||||||
restore_value: yes
|
restore_value: yes
|
||||||
initial_value: '210.29'
|
initial_value: $init_cold
|
||||||
- id: counter_hot_value
|
- id: counter_hot_value
|
||||||
type: float
|
type: float
|
||||||
restore_value: yes
|
restore_value: yes
|
||||||
initial_value: '109.74'
|
initial_value: $init_hot
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: pulse_cold
|
name: pulse_cold
|
||||||
pin:
|
pin:
|
||||||
number: D1
|
number: $pin_cold
|
||||||
mode: INPUT_PULLUP
|
mode: INPUT_PULLUP
|
||||||
filters:
|
filters:
|
||||||
- delayed_off: 100ms
|
- delayed_off: 100ms
|
||||||
@@ -54,7 +67,7 @@ binary_sensor:
|
|||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: pulse_hot
|
name: pulse_hot
|
||||||
pin:
|
pin:
|
||||||
number: D2
|
number: $pin_hot
|
||||||
mode: INPUT_PULLUP
|
mode: INPUT_PULLUP
|
||||||
filters:
|
filters:
|
||||||
- delayed_off: 100ms
|
- delayed_off: 100ms
|
||||||
@@ -64,7 +77,7 @@ binary_sensor:
|
|||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: uptime
|
- platform: uptime
|
||||||
name: "Watercontrol Uptime"
|
name: "$upper_devicename Uptime"
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "counter_hot"
|
name: "counter_hot"
|
||||||
@@ -79,22 +92,22 @@ sensor:
|
|||||||
update_interval: 60s
|
update_interval: 60s
|
||||||
|
|
||||||
- platform: ultrasonic
|
- platform: ultrasonic
|
||||||
trigger_pin: D7
|
trigger_pin: $ultrasonic_trig_pin
|
||||||
echo_pin: D6
|
echo_pin: $ultrasonic_echo_pin
|
||||||
name: "Toilet Distance"
|
name: "Toilet Distance"
|
||||||
update_interval: 5s
|
update_interval: 5s
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: D5
|
number: $water_open_pin
|
||||||
inverted: yes
|
inverted: yes
|
||||||
id: water_open
|
id: water_open
|
||||||
interlock: [water_close]
|
interlock: [water_close]
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin:
|
pin:
|
||||||
number: D3
|
number: $water_close_pin
|
||||||
inverted: yes
|
inverted: yes
|
||||||
id: water_close
|
id: water_close
|
||||||
interlock: [water_open]
|
interlock: [water_open]
|
||||||
|
|||||||
Reference in New Issue
Block a user