Advertisement
insippo

HA 09.10.22 config.yaml

Oct 9th, 2022
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.28 KB | None | 0 0
  1. # Loads default set of integrations. Do not remove.
  2. default_config:
  3.  
  4. # Text to speech
  5. tts:
  6. - platform: google_translate
  7. automation: !include automations.yaml
  8. script: !include scripts.yaml
  9. scene: !include scenes.yaml
  10. #sensor: !include sensors.yaml
  11. #secret: !include secrets.yaml
  12. lovelace:
  13. resources:
  14. - url: /local/apexcharts-card.js?v=1.10.0
  15. type: module
  16. frontend:
  17. themes: !include_dir_merge_named themes
  18. template:
  19. - sensor:
  20. - name: keskminetemp
  21. unique_id: keskminetemp
  22. state: >-
  23. {% set list=state_attr('weather.openweathermap', 'forecast') %}
  24. {{ ((list[0].temperature + list[3].temperature + list[7].temperature + list[11].temperature) / 4)|round(1) }}
  25.  
  26. - sensor:
  27. - name: keskminetemp_real_feel
  28. unique_id: keskminetemp_real_feel
  29. state: >-
  30. {% set list=state_attr('weather.openweathermap', 'forecast') %}
  31. {% set temp_rf_0=13.2+0.6215*list[0].temperature-11.37*(list[0].wind_speed**0.16)+0.3965*list[0].temperature*(list[0].wind_speed**0.16)|float %}
  32. {% set temp_rf_4=13.2+0.6215*list[4].temperature-11.37*(list[4].wind_speed**0.16)+0.3965*list[4].temperature*(list[4].wind_speed**0.16)|float %}
  33. {% set temp_rf_8=13.2+0.6215*list[8].temperature-11.37*(list[8].wind_speed**0.16)+0.3965*list[8].temperature*(list[8].wind_speed**0.16)|float %}
  34. {% set temp_rf_12=13.2+0.6215*list[12].temperature-11.37*(list[12].wind_speed**0.16)+0.3965*list[12].temperature*(list[12].wind_speed**0.16)|float %}
  35. {{ ((temp_rf_0+temp_rf_4+temp_rf_8+temp_rf_12)/4)|round(1) }}
  36.  
  37. - sensor:
  38. - name: heatrequest
  39. unique_id: heatrequest
  40. state: >-
  41. {% set req_hours = (states('sensor.keskminetemp_real_feel')|int - 6) * -0.5 + 6 + states('input_number.pumbatunnid_input')|int %}
  42. {% if (req_hours > 24) %}
  43. req_hours=24
  44. {% elif (req_hours < states('input_number.pumbatunnid_min_input')|int) %}
  45. {% set req_hours=states('input_number.pumbatunnid_min_input')|int %}
  46. {% endif %}
  47. {{ req_hours|int }}
  48.  
  49.  
  50. - binary_sensor:
  51. - name: pumba taimer
  52. unique_id: pumba taimer
  53. state: >-
  54. {% set l=state_attr('sensor.nordpool_mwh_ee_eur_3_10_02', 'raw_today')|sort(attribute='value') %}
  55. {% set t = now() %}
  56. {% for i in range(states('sensor.heatrequest')|int) %}
  57. {% if (t >= l[i].start and t <= l[i].end) %}
  58. {{ true }}
  59. {% endif %}
  60. {% endfor %}
  61.  
  62.  
  63. - sensor:
  64. - name: Päeva odavaim hind
  65. unique_id: odavhind
  66. state: >-
  67. {% set l=state_attr('sensor.nordpool_mwh_ee_eur_3_10_02', 'raw_today')|sort(attribute='value') %}
  68. {{ l[states('sensor.heatrequest')|int-1].value }}
  69.  
  70.  
  71. switch:
  72. - platform: rpi_gpio
  73. ports:
  74. 17: soojuspump
  75. 18: reserv
  76.  
  77.  
  78. input_number:
  79. pumbatunnid_input:
  80. name: pumbatunnid_input
  81. min: -3
  82. max: 3
  83. step: 1
  84. unit_of_measurement: h
  85. pumbatunnid_min_input:
  86. name: pumbatunnid_min_input
  87. min: 0
  88. max: 5
  89. step: 1
  90. unit_of_measurement: h
  91.  
  92. sensor:
  93. - platform: nordpool
  94. low_price_cutoff: 1
  95. VAT: true
  96. region: "EE"
  97. precision: 3
  98. price_type: kWh
  99. additional_costs: '{% set s = { "day": 37300, "night": 21400 } %} {% if now().weekday() in (5,6) %} {{s.night|float}} {% else %} {% if now().hour >= 7 and now().hour < 22%} {{s.day|float}} {% else %} {{s.night|float}} {% endif %} {% endif %}'
  100.  
  101. automation Soojuspumba juhtimine:
  102. initial_state: 'on'
  103. alias: Soojuspumba juhtimine
  104. trigger:
  105. - platform: state
  106. entity_id: binary_sensor.pumba_taimer
  107. to: 'on'
  108. - platform: state
  109. entity_id: binary_sensor.pumba_taimer
  110. to: 'off'
  111. action:
  112. - service_template: 'switch.turn_{{trigger.to_state.state}}'
  113. entity_id:
  114. - switch.soojuspump
  115. - switch.sauna_eesruum_kulmkirst_626
  116.  
  117.  
  118. automation Soojuspumba juhtimine2:
  119. alias: kontroll
  120. trigger:
  121. - platform: time
  122. at:
  123. - '00:01:00'
  124. condition:
  125. condition: state
  126. entity_id: binary_sensor.pumba_taimer
  127. state: "on"
  128. action:
  129. - service: 'switch.turn_on'
  130. entity_id:
  131. - switch.soojuspump
  132. - switch.sauna_eesruum_kulmkirst_626
  133.  
  134.  
  135. ##### Proximity integration ####################################
  136. proximity:
  137. home:
  138. devices:
  139. - person.insippo
  140. tolerance: 1
  141. unit_of_measurement: km
  142.  
  143.  
  144.  
  145.  
  146. shelly:
  147. cloud_auth_key: "MTMxNzNmdWlk993849D048FA11889F826D84066A49AEB20243E83C86B4C00F17525DF363278AF14BE0017E94BF"
  148. cloud_server: "https://shelly-50-eu.shelly.cloud"
  149.  
  150. zone:
  151. - name: Home
  152. latitude: 58.35471965
  153. longitude: 24.665227203018866
  154. radius: 300
  155. icon: mdi:home
  156. # Example configuration.yaml entry
  157. ssdp:
  158.  
  159. # Example configuration.yaml entry
  160. samsungtv:
  161. - host: 192.168.2.39
  162.  
  163. influxdb:
  164. host: 192.168.2.11
  165. port: 8086
  166. database: homeassistant
  167. username: homeassistant
  168. password: tuscup-fijqaq
  169. max_retries: 3
  170. default_measurement: state
  171.  
  172.  
  173.  
  174.  
  175. ecovacs:
  176. username: seston@gmail.com
  177. password:
  178. country: ee
  179. continent: eu
  180.  
  181. system_log:
  182. max_entries: MAX_ENTRIES
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement