Patryk M. Gutowski před 7 měsíci
rodič
revize
c6fd56561b
1 změnil soubory, kde provedl 172 přidání a 0 odebrání
  1. 172 0
      bl-relay6-01.yaml

+ 172 - 0
bl-relay6-01.yaml

@@ -0,0 +1,172 @@
+substitutions:
+  devicename: bl-relay6-01
+  low_devicenaeme: bl-relay6-01
+  friendly_name: Waveshare Relay Board Garaz Podlewanie
+  area: "Garage"
+
+esphome:
+  name: ${devicename}
+  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 Home Assistant API
+api:
+  services:
+    - service: play_rtttl
+      variables:
+        song_str: string
+      then:
+        - rtttl.play:
+            rtttl: !lambda "return song_str;"
+
+packages:
+  # Enable Home Assistant API
+  esphome: !include common/keys.yaml
+
+# Enable logging
+logger:
+
+wifi:
+  ssid: !secret iot_ssid
+  password: !secret iot_password
+  domain: .int.mmax.cloud
+
+web_server:
+  port: 80
+
+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
+    restore_mode: RESTORE_DEFAULT_OFF
+  - platform: gpio
+    pin: GPIO2
+    id: relay2
+    name: Relay 2
+    restore_mode: RESTORE_DEFAULT_OFF
+  - platform: gpio
+    pin: GPIO41
+    id: relay3
+    name: Relay 3
+    restore_mode: RESTORE_DEFAULT_OFF
+  - platform: gpio
+    pin: GPIO42
+    id: relay4
+    name: Relay 4
+    restore_mode: RESTORE_DEFAULT_OFF
+  - platform: gpio
+    pin:
+      number: GPIO45
+      ignore_strapping_warning: true
+    id: relay5
+    name: Relay 5
+    restore_mode: RESTORE_DEFAULT_OFF
+  - platform: gpio
+    pin:
+      number: GPIO46
+      ignore_strapping_warning: true
+    id: relay6
+    name: Relay 6
+    restore_mode: RESTORE_DEFAULT_OFF
+    
+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