Advertisement
johannwilken

Esphome - Sonoff Dualr3

Jan 24th, 2025
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.03 KB | Source Code | 0 0
  1. esphome:
  2.   name: sonoff-dualr3-sp
  3.   friendly_name: Sonoff DualR3 SP
  4.  
  5. esp32:
  6.   board: esp32dev
  7.  
  8. logger:
  9.   level: INFO
  10.  
  11. wifi:
  12.   ssid: !secret wifi_ssid
  13.   password: !secret wifi_password
  14.  
  15. api:
  16. ota:
  17.   platform: esphome
  18.  
  19. button:
  20.   - platform: restart
  21.     name: "Sonoff DualR3 SP Restart"
  22.     id: button_restart
  23.  
  24. light:
  25.   - platform: status_led
  26.     name: "Sonoff DualR3 SP LED"
  27.     id: led_status
  28.     pin:
  29.       number: GPIO13
  30.       inverted: True
  31.     internal: True
  32.  
  33. switch:
  34.   - platform: gpio
  35.     name: "Pool Pump"
  36.     pin: GPIO27
  37.     id: relay_1
  38.  
  39.   - platform: gpio
  40.     name: "Pool Light"
  41.     pin: GPIO14
  42.     id: relay_2
  43.  
  44. binary_sensor:
  45.   - platform: gpio
  46.     name: "Button"
  47.     id: sensor_button
  48.     pin:
  49.       number: GPIO00
  50.       mode:
  51.         input: True
  52.         pullup: True
  53.       inverted: True
  54.     disabled_by_default: True
  55.     icon: 'mdi:radiobox-blank'
  56.     filters:
  57.       - delayed_on: 50ms
  58.     on_press:
  59.       - switch.toggle: relay_1
  60.  
  61.   - platform: gpio
  62.     name: "Pool Pump"
  63.     pin:
  64.       number: GPIO32
  65.       mode:
  66.         input: True
  67.         pullup: True
  68.       inverted: True
  69.     filters:
  70.       - delayed_on_off: 50ms
  71.     on_press:
  72.       - switch.turn_on: relay_1
  73.     on_release:
  74.       - switch.turn_off: relay_1
  75.  
  76.   - platform: gpio
  77.     name: "Pool Light"
  78.     pin:
  79.       number: GPIO33
  80.       mode:
  81.         input: True
  82.         pullup: True
  83.       inverted: True
  84.     filters:
  85.       - delayed_on_off: 50ms
  86.     on_press:
  87.       - switch.turn_on: relay_2
  88.     on_release:
  89.       - switch.turn_off: relay_2
  90.  
  91. uart:
  92.   tx_pin: GPIO25
  93.   rx_pin: GPIO26
  94.   baud_rate: 38400
  95.   parity: EVEN
  96.   stop_bits: 1
  97.  
  98. sensor:
  99.   - platform: cse7761
  100.     update_interval: 5s
  101.     voltage:
  102.       name: 'SP Voltage'
  103.     current_1:
  104.       name: 'Pool Pump Current'
  105.       disabled_by_default: True
  106.     current_2:
  107.       name: 'Pool Light Current'
  108.       disabled_by_default: True
  109.     active_power_1:
  110.       name: 'Pool Pump Power'
  111.     active_power_2:
  112.       name: 'Pool Light Power'      
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement