Guest User

Untitled

a guest
May 30th, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1. substitutions:
  2. devicename: ac-livingroom
  3. upper_devicename: AC-Livingroom
  4. deviceIP: 192.168.178.37
  5. deviceGatew: 192.168.178.1
  6. deviceSub: 255.255.255.0
  7. deviceSSID1: 7390_iot
  8. deviceSSID2: 7390AP
  9.  
  10. esphome:
  11. name: ${devicename}
  12. comment: ${upper_devicename}
  13. preferences: flash_write_interval: 5min
  14. platformio_options:
  15. upload_speed: 2000000
  16.  
  17. esp8266:
  18. board: esp12e
  19.  
  20. # Disable logging via UART
  21. logger:
  22. baud_rate: 0
  23.  
  24. # Enable Home Assistant API
  25. api:
  26. encryption:
  27. key: "xxx+YDOHxQC/DMBS3J5k="
  28.  
  29. ota:
  30. password: "xxx"
  31. platform: esphome
  32.  
  33. wifi:
  34. networks:
  35. - ssid: ${deviceSSID1}
  36. password: !secret wifi_password
  37. manual_ip:
  38. # Set this to the IP of the ESP
  39. static_ip: ${deviceIP}
  40. # Set this to the IP address of the router. Often ends with .1
  41. gateway: ${deviceGatew}
  42. # The subnet of the network. 255.255.255.0 works for most home networks.
  43. subnet: ${deviceSub}
  44. - ssid: ${deviceSSID2}
  45. password: !secret wifi_password
  46. manual_ip:
  47. # Set this to the IP of the ESP
  48. static_ip: ${deviceIP}
  49. # Set this to the IP address of the router. Often ends with .1
  50. gateway: ${deviceGatew}
  51. # The subnet of the network. 255.255.255.0 works for most home networks.
  52. subnet: ${deviceSub}
  53.  
  54. # Enable fallback hotspot (captive portal) in case wifi connection fails
  55. ap:
  56. ssid: "ac-livingroom"
  57. password: "REDACTED"
  58.  
  59. captive_portal:
  60.  
  61. # Enable Web server.
  62. web_server:
  63. port: 80
  64.  
  65. time:
  66. - platform: homeassistant
  67. id: homeassistant_time
  68.  
  69. # Text sensors with general information.
  70. text_sensor:
  71. # Expose ESPHome version as sensor.
  72. - platform: version
  73. name: ESPHome Version
  74. # Expose WiFi information as sensors.
  75. - platform: wifi_info
  76. ip_address:
  77. name: ${upper_devicename} IP
  78. mac_address:
  79. name: ${upper_devicename} MAC
  80. ssid:
  81. name: ${upper_devicename} SSID
  82.  
  83. # Sensors with general information.
  84. sensor:
  85. # Uptime sensor.
  86. - platform: uptime
  87. name: ${upper_devicename} Uptime
  88. filters:
  89. - lambda: return x / 60.0;
  90. unit_of_measurement: minutes
  91.  
  92. # WiFi Signal sensor.
  93. - platform: wifi_signal
  94. name: ${upper_devicename} WiFi Signal
  95. update_interval: 60s
  96.  
  97. - platform: homeassistant
  98. id: follow_me_sensorr
  99. entity_id: sensor.aranetrn_305f1_temperature ###this is my recent temp sensor...in living room i use a aranet radon sensor and in the bedroom i use a xiaomi ble temp/humidity sensor from ali with alternative firmware
  100. internal: false
  101. filters:
  102. - throttle: 10s
  103. - heartbeat: 1min
  104. - debounce: 1s
  105. on_value:
  106. midea_ac.follow_me:
  107. temperature: !lambda "return x;"
  108. beeper: false
  109.  
  110. # UART settings for Midea dongle (required)
  111. uart:
  112. tx_pin: GPIO1 # hardware dependant
  113. rx_pin: GPIO3 # hardware dependant
  114. baud_rate: 9600
  115.  
  116. # Main settings
  117. climate:
  118. - platform: midea
  119. name: ${upper_devicename} # Use a unique name.
  120. autoconf: true
  121. beeper: false
  122. visual:
  123. min_temperature: 16 °C
  124. max_temperature: 30 °C
  125. temperature_step: 1 °C
  126. supported_modes: # All capabilities in this section detected by autoconf.
  127. - FAN_ONLY # This capability is always used.
  128. - COOL
  129. - DRY
  130. - HEAT
  131. custom_fan_modes:
  132. - SILENT
  133. - TURBO
  134. supported_presets: # All capabilities in this section detected by autoconf.
  135. - ECO
  136. - BOOST
  137. - SLEEP
  138. supported_swing_modes:
  139. - VERTICAL # This capability is always used.
  140.  
  141. #new added for test
  142. remote_transmitter:
  143. pin: GPIO13
  144. carrier_duty_percent: 100%
  145.  
  146. #new added for test
  147. button:
  148. - platform: template
  149. name: Display Toggle
  150. icon: mdi:theme-light-dark
  151. on_press:
  152. midea_ac.display_toggle:
  153. - platform: template
  154. name: Swing Step
  155. icon: mdi:tailwind
  156. on_press:
  157. midea_ac.swing_step:
  158.  
  159. switch:
  160. - platform: template
  161. name: ${upper_devicename} Beeper
  162. icon: mdi:volume-source
  163. restore_mode: Always_off
  164. optimistic: true
  165. turn_on_action:
  166. midea_ac.beeper_on:
  167. turn_off_action:
  168. midea_ac.beeper_off:
  169.  
Advertisement
Add Comment
Please, Sign In to add comment