mirror of
https://github.com/ryansch/esphome-config.git
synced 2025-04-19 14:57:54 +00:00
Add waveshare-esp32-s3-relay-6ch.yaml
This commit is contained in:
parent
86381e6902
commit
791e1493a3
169
waveshare-esp32-s3-relay-6ch.yaml
Normal file
169
waveshare-esp32-s3-relay-6ch.yaml
Normal file
@ -0,0 +1,169 @@
|
||||
substitutions:
|
||||
name: waveshare-esp32-s3-relay-6ch
|
||||
friendly_name: Waveshare Relay Board
|
||||
area: ""
|
||||
|
||||
esphome:
|
||||
name: ${name}
|
||||
friendly_name: ${friendly_name}
|
||||
area: ${area}
|
||||
name_add_mac_suffix: true
|
||||
project:
|
||||
name: waveshare.esp32-s3-relay-6ch
|
||||
version: 1.0.0
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
services:
|
||||
- service: play_rtttl
|
||||
variables:
|
||||
song_str: string
|
||||
then:
|
||||
- rtttl.play:
|
||||
rtttl: !lambda "return song_str;"
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: waveshare-esp32-s3-relay-6ch_ota
|
||||
|
||||
wifi:
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap: {}
|
||||
|
||||
captive_portal:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
dashboard_import:
|
||||
package_import_url: github://ryansch/esphome-config/waveshare-esp32-s3-relay-6ch.yaml
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: homeassistant_time
|
||||
|
||||
binary_sensor:
|
||||
- platform: status
|
||||
name: "Status"
|
||||
|
||||
- platform: gpio
|
||||
name: "Boot Button"
|
||||
pin:
|
||||
number: 0
|
||||
ignore_strapping_warning: true
|
||||
mode:
|
||||
input: true
|
||||
inverted: true
|
||||
disabled_by_default: true
|
||||
on_press:
|
||||
then:
|
||||
- button.press: restart_button
|
||||
|
||||
text_sensor:
|
||||
- platform: version
|
||||
name: "Firmware Version"
|
||||
- platform: wifi_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
entity_category: diagnostic
|
||||
ssid:
|
||||
name: "Connected SSID"
|
||||
entity_category: diagnostic
|
||||
mac_address:
|
||||
name: "Mac Address"
|
||||
entity_category: diagnostic
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: GPIO1
|
||||
id: relay1
|
||||
name: Relay 1
|
||||
- platform: gpio
|
||||
pin: GPIO2
|
||||
id: relay2
|
||||
name: Relay 2
|
||||
- platform: gpio
|
||||
pin: GPIO41
|
||||
id: relay3
|
||||
name: Relay 3
|
||||
- platform: gpio
|
||||
pin: GPIO42
|
||||
id: relay4
|
||||
name: Relay 4
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO45
|
||||
ignore_strapping_warning: true
|
||||
id: relay5
|
||||
name: Relay 5
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO46
|
||||
ignore_strapping_warning: true
|
||||
id: relay6
|
||||
name: Relay 6
|
||||
|
||||
uart:
|
||||
tx_pin: GPIO17
|
||||
rx_pin: GPIO18
|
||||
baud_rate: 115200
|
||||
|
||||
# buzzer
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: GPIO21
|
||||
id: buzzer
|
||||
|
||||
rtttl:
|
||||
output: buzzer
|
||||
id: rtttl_buzzer
|
||||
gain: 30%
|
||||
|
||||
light:
|
||||
- platform: neopixelbus
|
||||
type: RGB
|
||||
variant: 800KBPS
|
||||
pin: GPIO38
|
||||
num_leds: 1
|
||||
name: "RGB LED"
|
||||
id: rgb_led
|
||||
|
||||
button:
|
||||
- platform: restart
|
||||
name: "Restart"
|
||||
id: restart_button
|
||||
entity_category: config
|
||||
|
||||
- platform: factory_reset
|
||||
name: "Factory Reset"
|
||||
id: reset
|
||||
entity_category: config
|
||||
|
||||
- platform: safe_mode
|
||||
name: "Safe Mode"
|
||||
internal: false
|
||||
entity_category: config
|
||||
|
||||
sensor:
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal"
|
||||
id: wifi_signal_db
|
||||
update_interval: 60s
|
||||
entity_category: diagnostic
|
||||
|
||||
# Reports the WiFi signal strength in %
|
||||
- platform: copy
|
||||
source_id: wifi_signal_db
|
||||
name: "WiFi Strength"
|
||||
filters:
|
||||
- lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
|
||||
unit_of_measurement: "%"
|
||||
entity_category: diagnostic
|
Loading…
x
Reference in New Issue
Block a user