Advertisement
bc_csabi

Untitled

Jan 17th, 2023 (edited)
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | Source Code | 0 0
  1. esphome:
  2. name: "shelly-uni"
  3.  
  4. esp8266:
  5. board: esp01_1m
  6.  
  7. # Enable logging
  8. logger:
  9.  
  10. # Enable Home Assistant API
  11. api:
  12.  
  13. ota:
  14.  
  15.  
  16. wifi:
  17. ssid: !secret wifi_ssid
  18. password: !secret wifi_password
  19.  
  20. # Enable fallback hotspot (captive portal) in case wifi connection fails
  21. ap:
  22. ssid: "Esphome-Web-77B1F3"
  23. password: "hpJ8BSn4hHVO"
  24.  
  25. captive_portal:
  26.  
  27. #----Wifi Sensor----
  28. sensor:
  29. - platform: wifi_signal
  30. name: "WiFi Signal Sensor"
  31. update_interval: 60s
  32.  
  33. #----Pinout----
  34. # GPIO00 Led_i 1
  35. # GPIO04 Relay 2
  36. # GPIO05 AM2301
  37. # GPIO12 Switch_n 1
  38. # GPIO13 Switch_n 2
  39. # GPIO14 Switch_n 3
  40. # GPIO15 Relay 1
  41. # GPIO17 ADC Range 1
  42.  
  43. #----Output-----
  44. switch:
  45.  
  46. #----Relay_01----
  47. - platform: gpio
  48. name: "Relay_15"
  49. id: relay_15
  50. pin:
  51. number: GPIO15
  52. inverted: true
  53.  
  54. #----Relay_02----
  55. - platform: gpio
  56. name: "Relay_04"
  57. id: relay_04
  58. pin:
  59. number: GPIO04
  60. inverted: true
  61.  
  62. #----Led----
  63. - platform: gpio
  64. name: "Némítás"
  65. id: relay_00
  66. icon: mdi:volume-off
  67. pin:
  68. number: GPIO00
  69. inverted: true
  70. on_turn_on:
  71. - switch.turn_on: relay_04
  72. on_turn_off:
  73. - switch.turn_off: relay_04
  74.  
  75. #----Sensors----
  76. binary_sensor:
  77.  
  78. #----Sensor_01 - //Orange// ----
  79. - platform: gpio
  80. pin:
  81. number: GPIO12
  82. mode:
  83. input: true
  84. id: sensor_01
  85. filters:
  86. - invert:
  87. name: "Csengetés"
  88. device_class: sound
  89.  
  90. #----Sensor_02 - //Braun// ----
  91. - platform: gpio
  92. pin:
  93. number: GPIO13
  94. mode:
  95. input: true
  96. id: sensor_02
  97. filters:
  98. name: "Kagyló"
  99. on_press:
  100. then:
  101. if:
  102. condition:
  103. - switch.is_on: relay_00
  104. then:
  105. - switch.turn_off: relay_04
  106. on_release:
  107. then:
  108. if:
  109. condition:
  110. - switch.is_on: relay_00
  111. then:
  112. - switch.turn_on: relay_04
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement