Adds initial config files
This commit is contained in:
commit
5ae5c5d1f7
15 changed files with 668 additions and 0 deletions
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
secrets.yaml filter=git-crypt diff=git-crypt
|
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Gitignore settings for ESPHome
|
||||
# This is an example and may include too much for your use-case.
|
||||
# You can modify this file to suit your needs.
|
||||
/.esphome/
|
||||
**/.pioenvs/
|
||||
**/.piolibdeps/
|
||||
**/lib/
|
||||
**/src/
|
||||
**/platformio.ini
|
41
bedroom-celing-light.yaml
Normal file
41
bedroom-celing-light.yaml
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: bedroom_celieng_light
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
id: celing
|
||||
name: "Bedroom Celing"
|
||||
color_interlock: true
|
||||
red: Red
|
||||
green: Green
|
||||
blue: Blue
|
||||
white: White
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO14
|
||||
id: Red
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO12
|
||||
id: Green
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO05
|
||||
id: Blue
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO15
|
||||
id: White
|
||||
|
44
bedroom-lamp.yaml
Normal file
44
bedroom-lamp.yaml
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: bedroom_lamp
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
id: lamp
|
||||
name: "Bedroom Lamp"
|
||||
output: gpio_12
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO12
|
||||
id: gpio_12
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: push_button
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
internal: true
|
||||
on_press:
|
||||
# Prevents unintended LED lit states.
|
||||
if:
|
||||
condition:
|
||||
- light.is_off: lamp
|
||||
then:
|
||||
#- light.turn_on: blue_led
|
||||
- light.turn_on: lamp
|
||||
else:
|
||||
- light.turn_off: lamp
|
119
bedroom-switch.yaml
Normal file
119
bedroom-switch.yaml
Normal file
|
@ -0,0 +1,119 @@
|
|||
esphome:
|
||||
name: bedroom_switch
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
filters:
|
||||
- delayed_on: 30ms
|
||||
- delayed_off: 30ms
|
||||
internal: True
|
||||
on_multi_click:
|
||||
# Single
|
||||
- timing:
|
||||
- ON for at most 1s
|
||||
- OFF for at least 0.5s
|
||||
then:
|
||||
- text_sensor.template.publish:
|
||||
id: bedroom_button
|
||||
state: !lambda 'return "single";'
|
||||
#- homeassistant.service:
|
||||
# service: input_boolean.turn_on
|
||||
# data:
|
||||
# entity_id: input_boolean.bedroom_single
|
||||
#- delay: 0.2s
|
||||
#- homeassistant.service:
|
||||
# service: input_boolean.turn_off
|
||||
# data:
|
||||
# entity_id: input_boolean.bedroom_single
|
||||
# Double
|
||||
- timing:
|
||||
- ON for at most 1s
|
||||
- OFF for at most 1s
|
||||
- ON for at most 1s
|
||||
- OFF for at least 0.2s
|
||||
then:
|
||||
- text_sensor.template.publish:
|
||||
id: bedroom_button
|
||||
state: !lambda 'return "double";'
|
||||
#- homeassistant.service:
|
||||
# service: input_boolean.turn_on
|
||||
# data:
|
||||
# entity_id: input_boolean.bedroom_double
|
||||
#- delay: 0.2s
|
||||
#- homeassistant.service:
|
||||
# service: input_boolean.turn_off
|
||||
# data:
|
||||
# entity_id: input_boolean.bedroom_double
|
||||
# Hold
|
||||
- timing:
|
||||
- ON for 1s to 3s
|
||||
- OFF for at least 0.5s
|
||||
then:
|
||||
- text_sensor.template.publish:
|
||||
id: bedroom_button
|
||||
state: !lambda 'return "hold";'
|
||||
#- homeassistant.service:
|
||||
# service: input_boolean.turn_on
|
||||
# data:
|
||||
# entity_id: input_boolean.bedroom_hold
|
||||
#- delay: 0.2s
|
||||
#- homeassistant.service:
|
||||
# service: input_boolean.turn_off
|
||||
# data:
|
||||
# entity_id: input_boolean.bedroom_hold
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: blue_led
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: blue_led
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Bedroom Relay"
|
||||
pin: GPIO12
|
||||
|
||||
output:
|
||||
# Register the blue LED as a dimmable output ....
|
||||
- platform: esp8266_pwm
|
||||
id: blue_led
|
||||
pin: GPIO13
|
||||
inverted: True
|
||||
|
||||
text_sensor:
|
||||
- platform: template
|
||||
name: "Bedroom Touchpad"
|
||||
id: bedroom_button
|
||||
icon: "mdi:toggle-switch"
|
||||
on_value:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
text_sensor.state:
|
||||
id: bedroom_button
|
||||
state: ""
|
||||
else:
|
||||
- delay: 20ms
|
||||
- text_sensor.template.publish:
|
||||
id: bedroom_button
|
||||
state: !lambda 'return "";'
|
||||
|
||||
#light:
|
||||
# # ... and then make a light out of it.
|
||||
# - platform: monochromatic
|
||||
# name: "Bedroom switch light"
|
||||
# output: blue_led
|
41
hall-celing-light.yaml
Normal file
41
hall-celing-light.yaml
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: hall_celieng_light
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
id: celing
|
||||
name: "Hall Celing"
|
||||
color_interlock: true
|
||||
red: Red
|
||||
green: Green
|
||||
blue: Blue
|
||||
white: White
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO14
|
||||
id: Red
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO12
|
||||
id: Green
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO05
|
||||
id: Blue
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO15
|
||||
id: White
|
||||
|
63
heated-blanket.yaml
Normal file
63
heated-blanket.yaml
Normal file
|
@ -0,0 +1,63 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: heated_blanket
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
id: lamp
|
||||
name: "Heated Blanket"
|
||||
output: gpio_12
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO12
|
||||
id: gpio_12
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: push_button
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
internal: true
|
||||
on_press:
|
||||
# Prevents unintended LED lit states.
|
||||
if:
|
||||
condition:
|
||||
- light.is_off: lamp
|
||||
then:
|
||||
#- light.turn_on: blue_led
|
||||
- light.turn_on: lamp
|
||||
else:
|
||||
- light.turn_off: lamp
|
||||
|
||||
#switch:
|
||||
# # The relay switches on the red side of the LED when active.
|
||||
# - platform: gpio
|
||||
# name: "Sonoff Basic Relay"
|
||||
# pin: GPIO12
|
||||
# id: relay
|
||||
# on_turn_off:
|
||||
# if:
|
||||
# condition:
|
||||
# - switch.is_on: blue_led
|
||||
# then:
|
||||
# - switch.turn_off: blue_led
|
||||
# # With this we can control the blue side of the LED.
|
||||
# - platform: gpio
|
||||
# id: blue_led
|
||||
# pin:
|
||||
# number: GPIO13
|
||||
# inverted: True
|
41
kettle.yaml
Normal file
41
kettle.yaml
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: kettle
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
internal: true
|
||||
name: "Kettle Button"
|
||||
on_press:
|
||||
# Prevents unintended LED lit states.
|
||||
if:
|
||||
condition:
|
||||
- switch.is_off: kettle
|
||||
then:
|
||||
#- light.turn_on: blue_led
|
||||
- switch.turn_on: kettle
|
||||
else:
|
||||
- switch.turn_off: kettle
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Kettle"
|
||||
id: kettle
|
||||
pin: GPIO12
|
||||
|
44
lounge-arch.yaml
Normal file
44
lounge-arch.yaml
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: lounge_arch
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
id: lamp
|
||||
name: "Lounge Archway"
|
||||
output: gpio_12
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO12
|
||||
id: gpio_12
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: push_button
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
internal: true
|
||||
on_press:
|
||||
# Prevents unintended LED lit states.
|
||||
if:
|
||||
condition:
|
||||
- light.is_off: lamp
|
||||
then:
|
||||
#- light.turn_on: blue_led
|
||||
- light.turn_on: lamp
|
||||
else:
|
||||
- light.turn_off: lamp
|
41
lounge-celing-light.yaml
Normal file
41
lounge-celing-light.yaml
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: lounge_celieng_light
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
id: celing
|
||||
name: "Lounge Celing"
|
||||
color_interlock: true
|
||||
red: Red
|
||||
green: Green
|
||||
blue: Blue
|
||||
white: White
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO14
|
||||
id: Red
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO12
|
||||
id: Green
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO05
|
||||
id: Blue
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO15
|
||||
id: White
|
||||
|
44
lounge-light-1.yaml
Normal file
44
lounge-light-1.yaml
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: lounge_light_1
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
id: lamp
|
||||
name: "Desk Lamp"
|
||||
output: gpio_12
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO12
|
||||
id: gpio_12
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: push_button
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
internal: true
|
||||
on_press:
|
||||
# Prevents unintended LED lit states.
|
||||
if:
|
||||
condition:
|
||||
- light.is_off: lamp
|
||||
then:
|
||||
#- light.turn_on: blue_led
|
||||
- light.turn_on: lamp
|
||||
else:
|
||||
- light.turn_off: lamp
|
63
lounge-light-2.yaml
Normal file
63
lounge-light-2.yaml
Normal file
|
@ -0,0 +1,63 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: lounge_light_2
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
id: lamp
|
||||
name: "Desk Lamp 2"
|
||||
output: gpio_12
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO12
|
||||
id: gpio_12
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: push_button
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
internal: true
|
||||
on_press:
|
||||
# Prevents unintended LED lit states.
|
||||
if:
|
||||
condition:
|
||||
- light.is_off: lamp
|
||||
then:
|
||||
#- light.turn_on: blue_led
|
||||
- light.turn_on: lamp
|
||||
else:
|
||||
- light.turn_off: lamp
|
||||
|
||||
#switch:
|
||||
# # The relay switches on the red side of the LED when active.
|
||||
# - platform: gpio
|
||||
# name: "Sonoff Basic Relay"
|
||||
# pin: GPIO12
|
||||
# id: relay
|
||||
# on_turn_off:
|
||||
# if:
|
||||
# condition:
|
||||
# - switch.is_on: blue_led
|
||||
# then:
|
||||
# - switch.turn_off: blue_led
|
||||
# # With this we can control the blue side of the LED.
|
||||
# - platform: gpio
|
||||
# id: blue_led
|
||||
# pin:
|
||||
# number: GPIO13
|
||||
# inverted: True
|
76
lounge-switch.yaml
Normal file
76
lounge-switch.yaml
Normal file
|
@ -0,0 +1,76 @@
|
|||
esphome:
|
||||
name: lounge_switch
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
name: "Lounge Touchpad 1"
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: blue_led
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: blue_led
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO9
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
name: "Lounge Touchpad 2"
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: blue_led
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: blue_led
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO10
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
name: "Lounge Touchpad 3"
|
||||
on_press:
|
||||
then:
|
||||
- output.turn_on: blue_led
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: blue_led
|
||||
# - platform: status
|
||||
# name: "Sonoff T1 UK 3 Gang Status"
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Lounge Relay 1"
|
||||
pin: GPIO12
|
||||
- platform: gpio
|
||||
name: "Lounge Relay 2"
|
||||
pin: GPIO5
|
||||
- platform: gpio
|
||||
name: "Lounge Relay 3"
|
||||
pin: GPIO4
|
||||
|
||||
output:
|
||||
# Register the blue LED as a dimmable output ....
|
||||
- platform: esp8266_pwm
|
||||
id: blue_led
|
||||
pin: GPIO13
|
||||
inverted: True
|
||||
|
||||
#light:
|
||||
# # ... and then make a light out of it.
|
||||
# - platform: monochromatic
|
||||
# name: "Bedroom switch light"
|
||||
# output: blue_led
|
BIN
secrets.yaml
Normal file
BIN
secrets.yaml
Normal file
Binary file not shown.
41
study-celing-light.yaml
Normal file
41
study-celing-light.yaml
Normal file
|
@ -0,0 +1,41 @@
|
|||
# Basic Config
|
||||
esphome:
|
||||
name: study_celieng_light
|
||||
platform: ESP8266
|
||||
board: esp8285
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi-ssid
|
||||
password: !secret wifi-password
|
||||
|
||||
logger:
|
||||
api:
|
||||
ota:
|
||||
|
||||
# Device Specific Config
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
id: celing
|
||||
name: "Study Celing"
|
||||
color_interlock: true
|
||||
red: Red
|
||||
green: Green
|
||||
blue: Blue
|
||||
white: White
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO14
|
||||
id: Red
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO12
|
||||
id: Green
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO05
|
||||
id: Blue
|
||||
- platform: esp8266_pwm
|
||||
pin: GPIO15
|
||||
id: White
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue