initial commit esphome
This commit is contained in:
247
esphome/og-sz-le-magic.yaml
Normal file
247
esphome/og-sz-le-magic.yaml
Normal file
@@ -0,0 +1,247 @@
|
||||
substitutions:
|
||||
device_name: og-sz-le-magic
|
||||
friendly_name: WLED-SZ-magic
|
||||
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
platform: ESP8266
|
||||
board: nodemcuv2
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "SFVKZveCeQ7nvwQbBl4Nn0KKbGz6ldlmzPEqs/+QIpA="
|
||||
|
||||
ota:
|
||||
password: "9bd950aa91bf6ae5a69a7070e6c58072"
|
||||
|
||||
captive_portal:
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_wled_ssid
|
||||
password: !secret wifi_wled_password
|
||||
|
||||
manual_ip:
|
||||
static_ip: 192.168.1.51
|
||||
gateway: 192.168.1.1
|
||||
subnet: 255.255.255.0
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "${device_name}"
|
||||
password: "6f9jvXdAKO4E"
|
||||
|
||||
# Enable web server
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
remote_receiver:
|
||||
pin: GPIO4
|
||||
dump: all
|
||||
|
||||
wled:
|
||||
|
||||
e131:
|
||||
method: multicast # default: register E1.31 to Multicast group
|
||||
|
||||
binary_sensor:
|
||||
- platform: remote_receiver
|
||||
name: "Remote ON"
|
||||
raw:
|
||||
code: [ -9052, 4434, -636, 523, -636, 492, -603, 526, -608, 522, -606, 523, -608, 520, -606, 522, -600, 529, -610, 1594, -633, 1602, -638, 1595, -631, 1601, -628, 1606, -635, 1600, -636, 1595, -637, 1597, -634, 1600, -637, 521, -604, 1600, -637, 1596, -638, 520, -609, 521, -606, 523, -634, 494, -610, 518, -608, 1597, -638, 520, -607, 521, -607, 1597, -635, 1598, -636, 1599, -665, 1568, -644 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on: ${device_name}
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote OFF"
|
||||
raw:
|
||||
code: [ -9008, 4482, -600, 531, -565, 564, -591, 536, -568, 564, -593, 537, -597, 529, -597, 531, -596, 534, -596, 1639, -597, 1635, -597, 1638, -598, 1638, -591, 1644, -568, 1665, -592, 1642, -566, 1670, -592, 1640, -595, 1639, -592, 1643, -567, 1665, -596, 1640, -597, 532, -595, 533, -594, 536, -596, 534, -597, 530, -567, 563, -568, 561, -599, 529, -568, 1667, -593, 1642, -591, 1642, -597 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_off: ${device_name}
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote BRIGHTUP"
|
||||
raw:
|
||||
code: [ -8998, 4475, -592, 533, -594, 535, -593, 535, -591, 536, -591, 536, -591, 537, -591, 535, -591, 536, -593, 1639, -592, 1638, -591, 1639, -589, 1640, -592, 1637, -593, 1638, -593, 1638, -591, 1637, -593, 1638, -593, 534, -592, 535, -594, 1636, -594, 535, -590, 537, -592, 535, -592, 536, -592, 534, -593, 1635, -594, 1639, -591, 536, -591, 1639, -591, 1639, -591, 1640, -591, 1639, -592 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.dim_relative:
|
||||
id: ${device_name}
|
||||
relative_brightness: 5%
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote BRIGHTDOWN"
|
||||
raw:
|
||||
code: [ -9000, 4476, -589, 537, -593, 533, -593, 536, -590, 536, -593, 536, -592, 535, -592, 535, -592, 535, -593, 1638, -593, 1638, -592, 1637, -591, 1640, -591, 1638, -592, 1639, -592, 1638, -592, 1639, -592, 1637, -591, 538, -592, 1637, -592, 1639, -592, 1637, -593, 536, -591, 536, -591, 536, -593, 534, -592, 1639, -591, 537, -592, 536, -590, 535, -593, 1637, -593, 1638, -594, 1636, -593 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.dim_relative:
|
||||
id: ${device_name}
|
||||
relative_brightness: -5%
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote RED"
|
||||
raw:
|
||||
code: [ -9011, 4465, -600, 558, -574, 528, -597, 556, -573, 555, -573, 524, -603, 556, -571, 530, -596, 558, -568, 1635, -597, 1633, -601, 1630, -603, 1628, -607, 1625, -596, 1633, -607, 1625, -605, 1626, -602, 1629, -600, 529, -602, 555, -592, 1607, -598, 1635, -634, 523, -572, 556, -574, 553, -573, 527, -596, 1635, -598, 1631, -596, 535, -599, 556, -567, 1633, -603, 1629, -604, 1627, -597 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: ${device_name}
|
||||
red: 100%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
white: 0%
|
||||
effect: None
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote GREEN"
|
||||
raw:
|
||||
code: [ -9042, 4433, -669, 488, -611, 517, -611, 517, -636, 492, -608, 519, -609, 518, -638, 490, -611, 517, -634, 1567, -636, 1596, -663, 1569, -633, 1597, -668, 1565, -637, 1591, -636, 1597, -637, 1592, -638, 1595, -641, 1588, -666, 492, -641, 1562, -665, 1565, -640, 518, -605, 522, -604, 523, -610, 518, -606, 522, -613, 1589, -633, 524, -610, 518, -604, 1598, -627, 1603, -641, 1591, -640 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: ${device_name}
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
white: 0%
|
||||
effect: None
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote BLUE"
|
||||
raw:
|
||||
code: [ -9041, 4434, -637, 521, -632, 494, -608, 521, -609, 519, -635, 493, -604, 524, -604, 523, -607, 521, -607, 1595, -664, 1567, -667, 1565, -664, 1568, -634, 1596, -635, 1598, -635, 1594, -669, 1566, -663, 1566, -634, 522, -637, 490, -607, 522, -636, 1565, -639, 519, -640, 487, -641, 487, -636, 491, -636, 1568, -666, 1564, -664, 1566, -666, 492, -640, 1562, -668, 1564, -671, 1559, -667 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: ${device_name}
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 100%
|
||||
white: 0%
|
||||
effect: None
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote WHITE"
|
||||
raw:
|
||||
code: [ -9057, 4433, -634, 524, -607, 523, -607, 521, -604, 525, -609, 520, -610, 518, -638, 491, -609, 521, -607, 1595, -637, 1595, -637, 1596, -640, 1594, -628, 1604, -638, 1596, -635, 1598, -637, 1593, -640, 1595, -635, 522, -606, 1600, -632, 524, -603, 1601, -637, 520, -609, 521, -607, 521, -604, 526, -610, 1593, -631, 527, -601, 1603, -661, 499, -607, 1593, -638, 1595, -666, 1567, -636 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: ${device_name}
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
white: 100%
|
||||
effect: None
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote FLASH"
|
||||
raw:
|
||||
code: [ -9011, 4485, -592, 537, -594, 536, -592, 536, -594, 537, -593, 537, -593, 536, -593, 537, -593, 536, -593, 1641, -594, 1642, -593, 1642, -592, 1644, -592, 1642, -592, 1644, -591, 1642, -594, 1640, -596, 1639, -594, 536, -594, 1641, -593, 1642, -593, 536, -593, 537, -594, 1641, -592, 537, -594, 536, -593, 1641, -594, 536, -594, 534, -597, 1639, -594, 1641, -592, 537, -593, 1643, -592 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: ${device_name}
|
||||
effect: "In Alarm"
|
||||
|
||||
- platform: remote_receiver
|
||||
name: "Remote STROBE"
|
||||
raw:
|
||||
code: [ -8971, 4511, -559, 565, -562, 568, -561, 565, -562, 566, -563, 564, -563, 567, -563, 564, -562, 565, -563, 1670, -563, 1668, -562, 1671, -560, 1671, -563, 1670, -560, 1669, -565, 1667, -563, 1673, -558, 567, -561, 564, -562, 566, -565, 563, -561, 569, -562, 567, -585, 540, -563, 571, -558, 1669, -561, 1671, -560, 1669, -563, 1670, -561, 1670, -564, 1668, -561, 1671, -560, 1672, -562 ]
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: ${device_name}
|
||||
effect: "Default Strobe"
|
||||
|
||||
light:
|
||||
- platform: rgbw
|
||||
name: ${friendly_name} # Put the name that you want to see in Home Assistant.
|
||||
id: ${device_name}
|
||||
red: red_channel
|
||||
green: green_channel
|
||||
blue: blue_channel
|
||||
white: white_channel
|
||||
effects: # Add few effects : Slow and fast random colors and an "in alarm" mode.
|
||||
- random:
|
||||
name: "Slow Random Colors"
|
||||
transition_length: 30s
|
||||
update_interval: 30s
|
||||
- random:
|
||||
name: "Fast Random Colors"
|
||||
transition_length: 4s
|
||||
update_interval: 5s
|
||||
- strobe:
|
||||
name: Default Strobe
|
||||
- strobe:
|
||||
name: In Alarm
|
||||
colors:
|
||||
- state: True
|
||||
brightness: 100%
|
||||
white: 0%
|
||||
red: 100%
|
||||
blue: 0%
|
||||
green: 0%
|
||||
duration: 150ms
|
||||
- state: False
|
||||
duration: 100ms
|
||||
- state: True
|
||||
brightness: 100%
|
||||
white: 0%
|
||||
red: 100%
|
||||
blue: 0%
|
||||
green: 0%
|
||||
duration: 150ms
|
||||
- state: False
|
||||
duration: 100ms
|
||||
- state: True
|
||||
brightness: 100%
|
||||
white: 0%
|
||||
red: 0%
|
||||
blue: 100%
|
||||
green: 0%
|
||||
duration: 150ms
|
||||
- state: False
|
||||
duration: 100ms
|
||||
- state: True
|
||||
brightness: 100%
|
||||
white: 0%
|
||||
red: 0%
|
||||
blue: 100%
|
||||
green: 0%
|
||||
duration: 150ms
|
||||
- state: False
|
||||
duration: 100ms
|
||||
|
||||
output:
|
||||
- platform: esp8266_pwm
|
||||
id: red_channel
|
||||
pin: GPIO12
|
||||
- platform: esp8266_pwm
|
||||
id: green_channel
|
||||
pin: GPIO5
|
||||
- platform: esp8266_pwm
|
||||
id: blue_channel
|
||||
pin: GPIO13
|
||||
- platform: esp8266_pwm
|
||||
id: white_channel
|
||||
pin: GPIO15
|
||||
|
||||
switch:
|
||||
- platform: restart
|
||||
name: "${device_name} Neustart"
|
||||
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "${device_name} Wi-Fi Signal"
|
||||
update_interval: 60s
|
||||
|
||||
- platform: uptime
|
||||
name: "${device_name} Uptime"
|
||||
update_interval: 60s
|
||||
Reference in New Issue
Block a user