updating configuration

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