parent
72f55187d2
commit
1c3264312d
16 changed files with 0 additions and 1098 deletions
@ -1,43 +0,0 @@ |
|||||||
#BlitzWolf BW-LT21 |
|
||||||
#https://www.banggood.com/BlitzWolf-BW-LT21-RGBWW-10W-E27-APP-Smart-LED-Light-Bulb-Work-With-Amazon-Alexa-Google-Assistant-AC100-240V-p-1551059.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
@ -1,46 +0,0 @@ |
|||||||
#SONOFF BASICR2 |
|
||||||
#https://www.banggood.com/SONOFF-BASICR2-10A-2200W-WIFI-Wireless-Smart-Switch-Remote-Control-Socket-APP-Timer-AC90-250V-50-or-60Hz-Works-with-Amazon-Alexa-Google-Home-Assistant-Nest-IFTTT-p-1019971.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
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 |
|
@ -1,110 +0,0 @@ |
|||||||
#SONOFF T1 EU/UK (1 button) |
|
||||||
#https://www.banggood.com/SONOFF-T1-EU-or-UK-AC-100-240V-1-or-2-or-3-Gang-TX-Series-WIFI-Wall-Switch-433Mhz-RF-Remote-Controlled-Wifi-Switch-Smart-Home-Switch-Works-With-Alexa-Google-Home-p-1470883.html?rmmds=myorder&cur_warehouse=UK&ID=6278514 |
|
||||||
|
|
||||||
esphome: |
|
||||||
name: bedroom_switch |
|
||||||
platform: ESP8266 |
|
||||||
board: esp01_1m |
|
||||||
|
|
||||||
wifi: |
|
||||||
ssid: !secret wifi-ssid |
|
||||||
password: !secret wifi-password |
|
||||||
|
|
||||||
logger: |
|
||||||
api: |
|
||||||
ota: |
|
||||||
|
|
||||||
# This is the button on the switch |
|
||||||
# It is no longer published to home assistant, it is instead used by esphome to |
|
||||||
# update the state of a "virtual" sensor. This is how I distinguish |
|
||||||
# between a single, double and hold push |
|
||||||
binary_sensor: |
|
||||||
- platform: gpio |
|
||||||
name: "Bedroom Sensor" |
|
||||||
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";' |
|
||||||
# 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";' |
|
||||||
# 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";' |
|
||||||
# There is a bit of a delay between pushing the button on the switch and |
|
||||||
# the light turning on. This is for 2 main reasons: |
|
||||||
# * There is a bit of a delay for the switch to decide if a single or |
|
||||||
# double press was wanted |
|
||||||
# * The smart bulbs take a little while to turn on |
|
||||||
# To give some instant feedback to the user, I re-purpose the wifi light. |
|
||||||
# Whenever the touchpad is being pushed, the light is on. |
|
||||||
# This makes it clear that the push has been registered. |
|
||||||
on_press: |
|
||||||
then: |
|
||||||
- output.turn_on: blue_led |
|
||||||
on_release: |
|
||||||
then: |
|
||||||
- output.turn_off: blue_led |
|
||||||
|
|
||||||
# This switch gives electrisity to the bulb. We want it on all the time really |
|
||||||
switch: |
|
||||||
- platform: gpio |
|
||||||
name: "Bedroom Relay" |
|
||||||
pin: GPIO12 |
|
||||||
restore_mode: ALWAYS_ON |
|
||||||
|
|
||||||
# This is the blue wifi led. |
|
||||||
# It is used above to determine whether or not a push is registered |
|
||||||
output: |
|
||||||
- platform: esp8266_pwm |
|
||||||
id: blue_led |
|
||||||
pin: GPIO13 |
|
||||||
inverted: True |
|
||||||
|
|
||||||
# This sensor is published to homeassistant with the value: |
|
||||||
# * single |
|
||||||
# * double |
|
||||||
# * hold |
|
||||||
# This can be used to trigger automations by type "state" |
|
||||||
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 "";' |
|
@ -1,43 +0,0 @@ |
|||||||
#BlitzWolf BW-LT21 |
|
||||||
#https://www.banggood.com/BlitzWolf-BW-LT21-RGBWW-10W-E27-APP-Smart-LED-Light-Bulb-Work-With-Amazon-Alexa-Google-Assistant-AC100-240V-p-1551059.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
@ -1,57 +0,0 @@ |
|||||||
#SONOFF T1 EU/UK (1 button) |
|
||||||
#https://www.banggood.com/SONOFF-T1-EU-or-UK-AC-100-240V-1-or-2-or-3-Gang-TX-Series-WIFI-Wall-Switch-433Mhz-RF-Remote-Controlled-Wifi-Switch-Smart-Home-Switch-Works-With-Alexa-Google-Home-p-1470883.html?rmmds=myorder&cur_warehouse=UK&ID=6278514 |
|
||||||
|
|
||||||
esphome: |
|
||||||
name: hall_switch_1 |
|
||||||
platform: ESP8266 |
|
||||||
board: esp01_1m |
|
||||||
|
|
||||||
wifi: |
|
||||||
ssid: !secret wifi-ssid |
|
||||||
password: !secret wifi-password |
|
||||||
|
|
||||||
logger: |
|
||||||
api: |
|
||||||
ota: |
|
||||||
|
|
||||||
# This is the button on the switch |
|
||||||
# It is no longer published to home assistant, it is instead used by esphome to |
|
||||||
# update the state of a "virtual" sensor. This is how I distinguish |
|
||||||
# between a single, double and hold push |
|
||||||
binary_sensor: |
|
||||||
- platform: gpio |
|
||||||
name: "Hall Switch 1 Sensor" |
|
||||||
pin: |
|
||||||
number: GPIO0 |
|
||||||
mode: INPUT_PULLUP |
|
||||||
inverted: True |
|
||||||
# There is a bit of a delay between pushing the button on the switch and |
|
||||||
# the light turning on. This is for 2 main reasons: |
|
||||||
# * There is a bit of a delay for the switch to decide if a single or |
|
||||||
# double press was wanted |
|
||||||
# * The smart bulbs take a little while to turn on |
|
||||||
# To give some instant feedback to the user, I re-purpose the wifi light. |
|
||||||
# Whenever the touchpad is being pushed, the light is on. |
|
||||||
# This makes it clear that the push has been registered. |
|
||||||
on_press: |
|
||||||
then: |
|
||||||
- output.turn_on: blue_led |
|
||||||
on_release: |
|
||||||
then: |
|
||||||
- output.turn_off: blue_led |
|
||||||
|
|
||||||
# This switch gives electrisity to the bulb. We want it on all the time really |
|
||||||
switch: |
|
||||||
- platform: gpio |
|
||||||
name: "Hall Switch Relay" |
|
||||||
pin: GPIO12 |
|
||||||
restore_mode: ALWAYS_ON |
|
||||||
|
|
||||||
# This is the blue wifi led. |
|
||||||
# It is used above to determine whether or not a push is registered |
|
||||||
output: |
|
||||||
- platform: esp8266_pwm |
|
||||||
id: blue_led |
|
||||||
pin: GPIO13 |
|
||||||
inverted: True |
|
||||||
|
|
@ -1,43 +0,0 @@ |
|||||||
#SONOFF S26 |
|
||||||
#https://www.amazon.co.uk/gp/product/B07TS5P2K1/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1 |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
@ -1,65 +0,0 @@ |
|||||||
#SONOFF BASICR2 |
|
||||||
#https://www.banggood.com/SONOFF-BASICR2-10A-2200W-WIFI-Wireless-Smart-Switch-Remote-Control-Socket-APP-Timer-AC90-250V-50-or-60Hz-Works-with-Amazon-Alexa-Google-Home-Assistant-Nest-IFTTT-p-1019971.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
esphome: |
|
||||||
name: kitchen_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: "Kitchen 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 |
|
||||||
|
|
||||||
#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 |
|
@ -1,164 +0,0 @@ |
|||||||
#SONOFF T1 EU/UK (3 buttons) |
|
||||||
#https://www.banggood.com/SONOFF-T1-EU-or-UK-AC-100-240V-1-or-2-or-3-Gang-TX-Series-WIFI-Wall-Switch-433Mhz-RF-Remote-Controlled-Wifi-Switch-Smart-Home-Switch-Works-With-Alexa-Google-Home-p-1470883.html?rmmds=myorder&cur_warehouse=UK&ID=6278514 |
|
||||||
|
|
||||||
esphome: |
|
||||||
name: kitchen_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: "Kitchen 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: "Kitchen Touchpad 2" |
|
||||||
on_press: |
|
||||||
if: |
|
||||||
condition: |
|
||||||
- light.is_off: kitchen_celing_light |
|
||||||
then: |
|
||||||
- light.turn_on: kitchen_celing_light |
|
||||||
- output.turn_on: blue_led |
|
||||||
else: |
|
||||||
- light.turn_off: kitchen_celing_light |
|
||||||
- output.turn_on: blue_led |
|
||||||
on_release: |
|
||||||
then: |
|
||||||
output.turn_off: blue_led |
|
||||||
|
|
||||||
- platform: gpio |
|
||||||
pin: |
|
||||||
number: GPIO10 |
|
||||||
mode: INPUT_PULLUP |
|
||||||
inverted: True |
|
||||||
name: "Kitchen Touchpad 3" |
|
||||||
on_press: |
|
||||||
if: |
|
||||||
condition: |
|
||||||
- light.is_off: under_lights_light |
|
||||||
then: |
|
||||||
- light.turn_on: under_lights_light |
|
||||||
- output.turn_on: blue_led |
|
||||||
else: |
|
||||||
- light.turn_off: under_lights_light |
|
||||||
- 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 |
|
||||||
restore_mode: ALWAYS_OFF |
|
||||||
# - 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 |
|
||||||
- platform: gpio |
|
||||||
id: kitchen_celing |
|
||||||
pin: GPIO5 |
|
||||||
- platform: gpio |
|
||||||
id: under_lights |
|
||||||
pin: GPIO4 |
|
||||||
|
|
||||||
light: |
|
||||||
- platform: binary |
|
||||||
name: "Kitchen Celing" |
|
||||||
output: kitchen_celing |
|
||||||
id: kitchen_celing_light |
|
||||||
- platform: binary |
|
||||||
name: "Kitchen Under Lighting" |
|
||||||
output: under_lights |
|
||||||
id: under_lights_light |
|
||||||
|
|
||||||
|
|
||||||
# This sensor is published to homeassistant with the value: |
|
||||||
# * single |
|
||||||
# * double |
|
||||||
# * hold |
|
||||||
# This can be used to trigger automations by type "state" |
|
||||||
#text_sensor: |
|
||||||
# - platform: template |
|
||||||
# name: "Lounge Touchpad 1" |
|
||||||
# id: louge_button_1 |
|
||||||
# icon: "mdi:toggle-switch" |
|
||||||
# on_value: |
|
||||||
# then: |
|
||||||
# - if: |
|
||||||
# condition: |
|
||||||
# text_sensor.state: |
|
||||||
# id: louge_button_1 |
|
||||||
# state: "" |
|
||||||
# else: |
|
||||||
# - delay: 20ms |
|
||||||
# - text_sensor.template.publish: |
|
||||||
# id: louge_button_1 |
|
||||||
# state: !lambda 'return "";' |
|
||||||
# - platform: template |
|
||||||
# name: "Lounge Touchpad 2" |
|
||||||
# id: louge_button_2 |
|
||||||
# icon: "mdi:toggle-switch" |
|
||||||
# on_value: |
|
||||||
# then: |
|
||||||
# - if: |
|
||||||
# condition: |
|
||||||
# text_sensor.state: |
|
||||||
# id: louge_button_2 |
|
||||||
# state: "" |
|
||||||
# else: |
|
||||||
# - delay: 20ms |
|
||||||
# - text_sensor.template.publish: |
|
||||||
# id: louge_button_2 |
|
||||||
# state: !lambda 'return "";' |
|
||||||
# - platform: template |
|
||||||
# name: "Lounge Touchpad 3" |
|
||||||
# id: louge_button_3 |
|
||||||
# icon: "mdi:toggle-switch" |
|
||||||
# on_value: |
|
||||||
# then: |
|
||||||
# - if: |
|
||||||
# condition: |
|
||||||
# text_sensor.state: |
|
||||||
# id: louge_button_3 |
|
||||||
# state: "" |
|
||||||
# else: |
|
||||||
# - delay: 20ms |
|
||||||
# - text_sensor.template.publish: |
|
||||||
# id: louge_button_3 |
|
||||||
# state: !lambda 'return "";' |
|
@ -1,46 +0,0 @@ |
|||||||
#SONOFF BASICR2 |
|
||||||
#https://www.banggood.com/SONOFF-BASICR2-10A-2200W-WIFI-Wireless-Smart-Switch-Remote-Control-Socket-APP-Timer-AC90-250V-50-or-60Hz-Works-with-Amazon-Alexa-Google-Home-Assistant-Nest-IFTTT-p-1019971.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
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 |
|
@ -1,43 +0,0 @@ |
|||||||
#BlitzWolf BW-LT21 |
|
||||||
#https://www.banggood.com/BlitzWolf-BW-LT21-RGBWW-10W-E27-APP-Smart-LED-Light-Bulb-Work-With-Amazon-Alexa-Google-Assistant-AC100-240V-p-1551059.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
@ -1,46 +0,0 @@ |
|||||||
#SONOFF BASICR2 |
|
||||||
#https://www.banggood.com/SONOFF-BASICR2-10A-2200W-WIFI-Wireless-Smart-Switch-Remote-Control-Socket-APP-Timer-AC90-250V-50-or-60Hz-Works-with-Amazon-Alexa-Google-Home-Assistant-Nest-IFTTT-p-1019971.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
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 |
|
@ -1,65 +0,0 @@ |
|||||||
#SONOFF BASICR2 |
|
||||||
#https://www.banggood.com/SONOFF-BASICR2-10A-2200W-WIFI-Wireless-Smart-Switch-Remote-Control-Socket-APP-Timer-AC90-250V-50-or-60Hz-Works-with-Amazon-Alexa-Google-Home-Assistant-Nest-IFTTT-p-1019971.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
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 |
|
@ -1,227 +0,0 @@ |
|||||||
#SONOFF T1 EU/UK (3 buttons) |
|
||||||
#https://www.banggood.com/SONOFF-T1-EU-or-UK-AC-100-240V-1-or-2-or-3-Gang-TX-Series-WIFI-Wall-Switch-433Mhz-RF-Remote-Controlled-Wifi-Switch-Smart-Home-Switch-Works-With-Alexa-Google-Home-p-1470883.html?rmmds=myorder&cur_warehouse=UK&ID=6278514 |
|
||||||
|
|
||||||
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 |
|
||||||
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: louge_button_1 |
|
||||||
state: !lambda 'return "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: louge_button_1 |
|
||||||
state: !lambda 'return "double";' |
|
||||||
# Hold |
|
||||||
- timing: |
|
||||||
- ON for 1s to 3s |
|
||||||
- OFF for at least 0.5s |
|
||||||
then: |
|
||||||
- text_sensor.template.publish: |
|
||||||
id: louge_button_1 |
|
||||||
state: !lambda 'return "hold";' |
|
||||||
name: "Lounge Raw 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 |
|
||||||
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: louge_button_2 |
|
||||||
state: !lambda 'return "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: louge_button_2 |
|
||||||
state: !lambda 'return "double";' |
|
||||||
# Hold |
|
||||||
- timing: |
|
||||||
- ON for 1s to 3s |
|
||||||
- OFF for at least 0.5s |
|
||||||
then: |
|
||||||
- text_sensor.template.publish: |
|
||||||
id: louge_button_2 |
|
||||||
state: !lambda 'return "hold";' |
|
||||||
name: "Lounge Raw 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 Raw Touchpad 3" |
|
||||||
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: louge_button_3 |
|
||||||
state: !lambda 'return "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: louge_button_3 |
|
||||||
state: !lambda 'return "double";' |
|
||||||
# Hold |
|
||||||
- timing: |
|
||||||
- ON for 1s to 3s |
|
||||||
- OFF for at least 0.5s |
|
||||||
then: |
|
||||||
- text_sensor.template.publish: |
|
||||||
id: louge_button_3 |
|
||||||
state: !lambda 'return "hold";' |
|
||||||
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 |
|
||||||
restore_mode: ALWAYS_OFF |
|
||||||
- platform: gpio |
|
||||||
name: "Lounge Relay 2" |
|
||||||
pin: GPIO5 |
|
||||||
restore_mode: ALWAYS_ON |
|
||||||
- platform: gpio |
|
||||||
name: "Lounge Relay 3" |
|
||||||
pin: GPIO4 |
|
||||||
restore_mode: ALWAYS_OFF |
|
||||||
|
|
||||||
output: |
|
||||||
# Register the blue LED as a dimmable output .... |
|
||||||
- platform: esp8266_pwm |
|
||||||
id: blue_led |
|
||||||
pin: GPIO13 |
|
||||||
inverted: True |
|
||||||
|
|
||||||
# This sensor is published to homeassistant with the value: |
|
||||||
# * single |
|
||||||
# * double |
|
||||||
# * hold |
|
||||||
# This can be used to trigger automations by type "state" |
|
||||||
text_sensor: |
|
||||||
- platform: template |
|
||||||
name: "Lounge Touchpad 1" |
|
||||||
id: louge_button_1 |
|
||||||
icon: "mdi:toggle-switch" |
|
||||||
on_value: |
|
||||||
then: |
|
||||||
- if: |
|
||||||
condition: |
|
||||||
text_sensor.state: |
|
||||||
id: louge_button_1 |
|
||||||
state: "" |
|
||||||
else: |
|
||||||
- delay: 20ms |
|
||||||
- text_sensor.template.publish: |
|
||||||
id: louge_button_1 |
|
||||||
state: !lambda 'return "";' |
|
||||||
- platform: template |
|
||||||
name: "Lounge Touchpad 2" |
|
||||||
id: louge_button_2 |
|
||||||
icon: "mdi:toggle-switch" |
|
||||||
on_value: |
|
||||||
then: |
|
||||||
- if: |
|
||||||
condition: |
|
||||||
text_sensor.state: |
|
||||||
id: louge_button_2 |
|
||||||
state: "" |
|
||||||
else: |
|
||||||
- delay: 20ms |
|
||||||
- text_sensor.template.publish: |
|
||||||
id: louge_button_2 |
|
||||||
state: !lambda 'return "";' |
|
||||||
- platform: template |
|
||||||
name: "Lounge Touchpad 3" |
|
||||||
id: louge_button_3 |
|
||||||
icon: "mdi:toggle-switch" |
|
||||||
on_value: |
|
||||||
then: |
|
||||||
- if: |
|
||||||
condition: |
|
||||||
text_sensor.state: |
|
||||||
id: louge_button_3 |
|
||||||
state: "" |
|
||||||
else: |
|
||||||
- delay: 20ms |
|
||||||
- text_sensor.template.publish: |
|
||||||
id: louge_button_3 |
|
||||||
state: !lambda 'return "";' |
|
Binary file not shown.
@ -1,43 +0,0 @@ |
|||||||
#BlitzWolf BW-LT21 |
|
||||||
#https://www.banggood.com/BlitzWolf-BW-LT21-RGBWW-10W-E27-APP-Smart-LED-Light-Bulb-Work-With-Amazon-Alexa-Google-Assistant-AC100-240V-p-1551059.html?rmmds=myorder&cur_warehouse=CN |
|
||||||
|
|
||||||
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 |
|
||||||
|
|
@ -1,57 +0,0 @@ |
|||||||
#SONOFF T1 EU/UK (1 button) |
|
||||||
#https://www.banggood.com/SONOFF-T1-EU-or-UK-AC-100-240V-1-or-2-or-3-Gang-TX-Series-WIFI-Wall-Switch-433Mhz-RF-Remote-Controlled-Wifi-Switch-Smart-Home-Switch-Works-With-Alexa-Google-Home-p-1470883.html?rmmds=myorder&cur_warehouse=UK&ID=6278514 |
|
||||||
|
|
||||||
esphome: |
|
||||||
name: study_switch |
|
||||||
platform: ESP8266 |
|
||||||
board: esp01_1m |
|
||||||
|
|
||||||
wifi: |
|
||||||
ssid: !secret wifi-ssid |
|
||||||
password: !secret wifi-password |
|
||||||
|
|
||||||
logger: |
|
||||||
api: |
|
||||||
ota: |
|
||||||
|
|
||||||
# This is the button on the switch |
|
||||||
# It is no longer published to home assistant, it is instead used by esphome to |
|
||||||
# update the state of a "virtual" sensor. This is how I distinguish |
|
||||||
# between a single, double and hold push |
|
||||||
binary_sensor: |
|
||||||
- platform: gpio |
|
||||||
name: "Study Sensor" |
|
||||||
pin: |
|
||||||
number: GPIO0 |
|
||||||
mode: INPUT_PULLUP |
|
||||||
inverted: True |
|
||||||
# There is a bit of a delay between pushing the button on the switch and |
|
||||||
# the light turning on. This is for 2 main reasons: |
|
||||||
# * There is a bit of a delay for the switch to decide if a single or |
|
||||||
# double press was wanted |
|
||||||
# * The smart bulbs take a little while to turn on |
|
||||||
# To give some instant feedback to the user, I re-purpose the wifi light. |
|
||||||
# Whenever the touchpad is being pushed, the light is on. |
|
||||||
# This makes it clear that the push has been registered. |
|
||||||
on_press: |
|
||||||
then: |
|
||||||
- output.turn_on: blue_led |
|
||||||
on_release: |
|
||||||
then: |
|
||||||
- output.turn_off: blue_led |
|
||||||
|
|
||||||
# This switch gives electrisity to the bulb. We want it on all the time really |
|
||||||
switch: |
|
||||||
- platform: gpio |
|
||||||
name: "Study Relay" |
|
||||||
pin: GPIO12 |
|
||||||
restore_mode: ALWAYS_ON |
|
||||||
|
|
||||||
# This is the blue wifi led. |
|
||||||
# It is used above to determine whether or not a push is registered |
|
||||||
output: |
|
||||||
- platform: esp8266_pwm |
|
||||||
id: blue_led |
|
||||||
pin: GPIO13 |
|
||||||
inverted: True |
|
||||||
|
|
Loading…
Reference in new issue