Add ESPhome
This commit is contained in:
108
ESPHome/config/common/minir4-local.yaml
Normal file
108
ESPHome/config/common/minir4-local.yaml
Normal file
@@ -0,0 +1,108 @@
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
friendly_name: ${friendly_name}
|
||||
comment: "Sonoff MiniR4 Extreme"
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: esp-idf
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "SHWdMNPDac9CCz0UTRCwvPrc20nzCa/xjDanSw8LVWc="
|
||||
|
||||
# Over-the-air Update
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: myota
|
||||
password: ${ota_password}
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "${device_name}"
|
||||
password: ${fallback_wifi_pwd}
|
||||
|
||||
captive_portal:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: ${friendly_name} Wifi Signal Strength
|
||||
update_interval: 90s
|
||||
entity_category: "diagnostic"
|
||||
|
||||
- platform: uptime
|
||||
name: ${friendly_name} Uptime
|
||||
update_interval: 300s
|
||||
entity_category: "diagnostic"
|
||||
|
||||
text_sensor:
|
||||
- platform: wifi_info
|
||||
ssid:
|
||||
name: Connected SSID
|
||||
ip_address:
|
||||
name: IP Address
|
||||
dns_address:
|
||||
name: DNS Address
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO19
|
||||
inverted: true
|
||||
|
||||
#######################################
|
||||
# Device specific Config Begins Below #
|
||||
#######################################
|
||||
|
||||
switch:
|
||||
- platform: restart
|
||||
name: ${friendly_name} Restart
|
||||
|
||||
output:
|
||||
# Physical relay on GPIO
|
||||
- platform: gpio
|
||||
pin: GPIO26
|
||||
id: relay_1
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
id: light_1
|
||||
name: ${friendly_name}
|
||||
icon: mdi:ceiling-light-multiple-outline
|
||||
restore_mode: restore_default_off
|
||||
output: relay_1
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO00
|
||||
id: button
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 50ms
|
||||
on_press:
|
||||
- light.toggle:
|
||||
id: light_1
|
||||
|
||||
- platform: gpio
|
||||
name: s1
|
||||
pin: GPIO27
|
||||
id: s1
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 50ms
|
||||
on_press:
|
||||
- light.toggle:
|
||||
id: light_1
|
||||
|
||||
bluetooth_proxy:
|
||||
active: ${bt_proxy}
|
||||
110
ESPHome/config/common/minir4.yaml
Normal file
110
ESPHome/config/common/minir4.yaml
Normal file
@@ -0,0 +1,110 @@
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
friendly_name: ${friendly_name}
|
||||
comment: "Sonoff MiniR4 Extreme"
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: esp-idf
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: "SHWdMNPDac9CCz0UTRCwvPrc20nzCa/xjDanSw8LVWc="
|
||||
|
||||
# Over-the-air Update
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: myota
|
||||
password: ${ota_password}
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "${device_name}"
|
||||
password: ${fallback_wifi_pwd}
|
||||
|
||||
captive_portal:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: ${friendly_name} Wifi Signal Strength
|
||||
update_interval: 90s
|
||||
entity_category: "diagnostic"
|
||||
|
||||
- platform: uptime
|
||||
name: ${friendly_name} Uptime
|
||||
update_interval: 300s
|
||||
entity_category: "diagnostic"
|
||||
|
||||
text_sensor:
|
||||
- platform: wifi_info
|
||||
ssid:
|
||||
name: Connected SSID
|
||||
ip_address:
|
||||
name: IP Address
|
||||
dns_address:
|
||||
name: DNS Address
|
||||
|
||||
status_led:
|
||||
pin:
|
||||
number: GPIO19
|
||||
inverted: true
|
||||
|
||||
#######################################
|
||||
# Device specific Config Begins Below #
|
||||
#######################################
|
||||
|
||||
switch:
|
||||
- platform: restart
|
||||
name: ${friendly_name} Restart
|
||||
|
||||
output:
|
||||
# Physical relay on GPIO
|
||||
- platform: gpio
|
||||
pin: GPIO26
|
||||
id: relay_1
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
id: light_1
|
||||
name: ${friendly_name}
|
||||
icon: mdi:ceiling-light-multiple-outline
|
||||
restore_mode: restore_default_off
|
||||
output: relay_1
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: GPIO00
|
||||
id: button
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 50ms
|
||||
on_press:
|
||||
- light.toggle:
|
||||
id: light_1
|
||||
|
||||
- platform: gpio
|
||||
name: s1
|
||||
pin: GPIO27
|
||||
id: s1
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 50ms
|
||||
on_press:
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: ${light_entity}
|
||||
|
||||
bluetooth_proxy:
|
||||
active: ${bt_proxy}
|
||||
Reference in New Issue
Block a user