configuration.yaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. homeassistant:
  2. # Name of the location where Home Assistant is running
  3. name: Home
  4. # Location required to calculate the time the sun rises and sets
  5. latitude: 52.1187
  6. longitude: 5.0994
  7. # Impacts weather/sunrise data (altitude above sea level in meters)
  8. elevation: 0
  9. # metric for Metric, imperial for Imperial
  10. unit_system: metric
  11. # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  12. time_zone: Europe/Dublin
  13. # Customization file
  14. customize: !include customize.yaml
  15. # Configure a default setup of Home Assistant (frontend, api, etc)
  16. default_config:
  17. # Show the introduction message on startup.
  18. #introduction:
  19. # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  20. # http:
  21. # base_url: example.duckdns.org:8123
  22. zwave:
  23. usb_path: /dev/ttyACM0 # determine using $ dmesg | grep tty
  24. # device_config: !include zwave_device_config.yaml
  25. network_key: "0xb2, 0x0d, 0x62, 0x9b, 0x7c, 0x91, 0x6e, 0xeb, 0xe8, 0x45, 0x9a, 0x96, 0x7e, 0x5b, 0x43, 0xe9"
  26. debug: false
  27. sensor:
  28. - platform: yr
  29. name: weather
  30. latitude: 53.386637
  31. longitude: -6.131277
  32. monitored_conditions:
  33. - temperature
  34. - symbol
  35. - precipitation
  36. - windSpeed
  37. # - pressure
  38. - windDirection
  39. # - humidity
  40. # - fog
  41. - cloudiness
  42. # - lowClouds
  43. # - mediumClouds
  44. # - highClouds
  45. # - dewpointTemperature
  46. mqtt:
  47. broker: localhost
  48. #tts:
  49. # - platform: google
  50. media_player:
  51. - platform: kodi
  52. host: tv
  53. port: 8080
  54. tcp_port: 9090
  55. username: kodi
  56. password: kodi
  57. timeout: 10
  58. enable_websocket: false
  59. script:
  60. water_immersion:
  61. sequence:
  62. - service: system_log.write
  63. data_template:
  64. message: Test 1 ({{duration}})...
  65. - delay: '{{duration}}'
  66. - service: system_log.write
  67. data:
  68. message: Test 2...
  69. automation:
  70. # - alias: time
  71. # trigger:
  72. # platform: time_pattern
  73. # hours: '1'
  74. # minutes: '*'
  75. # action:
  76. # - service: system_log.write
  77. # data:
  78. # message: "time."
  79. - alias: water immersion (weekdays)
  80. initial_state: false
  81. trigger:
  82. - platform: time
  83. at: '23:01:00'
  84. condition:
  85. condition: time
  86. weekday:
  87. - mon
  88. - tue
  89. - wed
  90. - thu
  91. - fri
  92. action:
  93. - service: script.water_immersion
  94. data:
  95. duration: '00:00:10'
  96. - alias: Turn on kitchen light when there is movement
  97. initial_state: true
  98. trigger:
  99. - platform: state
  100. entity_id: sensor.aeotec_multisensor_6_burglar
  101. from: "0"
  102. to: "8"
  103. - platform: state
  104. entity_id: sensor.aeotec_multisensor_6_burglar
  105. from: "3"
  106. to: "8"
  107. action:
  108. - service: system_log.write
  109. data:
  110. message: "***** State to 8 *****"
  111. - service: snips.say
  112. data:
  113. text: on, on, on
  114. - alias: Turn off kitchen light 10 minutes after last movement
  115. initial_state: true
  116. trigger:
  117. - platform: state
  118. entity_id: sensor.aeotec_multisensor_6_burglar
  119. from: "8"
  120. to: "0"
  121. for:
  122. minutes: 2
  123. - platform: state
  124. entity_id: sensor.aeotec_multisensor_6_burglar
  125. from: "3"
  126. to: "0"
  127. for:
  128. minutes: 2
  129. action:
  130. - service: system_log.write
  131. data:
  132. message: "***** State to 0 *****"
  133. - service: snips.say
  134. data:
  135. text: off, off, off
  136. snips:
  137. intent_script:
  138. # hello:
  139. # - service: persistent_notification.create
  140. # data:
  141. # message: ":-)"
  142. # title: "Hello Miranda!"
  143. # notification_id: "hello-notification"
  144. # action:
  145. # - service: script.kodi_play_artist
  146. # data:
  147. # a: "1"
  148. # b: "2"
  149. timeNow:
  150. action:
  151. - service: snips.say
  152. data_template:
  153. text: >
  154. {{now().hour % 12}} {% if now().minute < 10 %}oh{% endif %} {{now().minute}}
  155. bye:
  156. action:
  157. - service: script.water_immersion
  158. data:
  159. duration: '00:00:10'
  160. playArtist:
  161. action:
  162. - service: system_log.write
  163. data_template:
  164. message: >
  165. Playing {{artist_name}}...
  166. - service: snips.say
  167. data_template:
  168. text: >
  169. Playing {{artist_name}}
  170. - service: media_player.play_media
  171. data:
  172. entity_id: "media_player.kodi"
  173. media_content_type: "music"
  174. media_content_id: "/mnt/nas/music/misc/15-seconds-of-silence.mp3"
  175. - service: media_player.clear_playlist
  176. data:
  177. entity_id: "media_player.kodi"
  178. - service: media_player.kodi_add_to_playlist
  179. data_template:
  180. entity_id: "media_player.kodi"
  181. media_type: "ALBUM"
  182. media_name: "ALL"
  183. artist_name: >
  184. {{artist_name}}
  185. - service: media_player.media_next_track
  186. data:
  187. entity_id: "media_player.kodi"
  188. - service: system_log.write
  189. data:
  190. message: Done.
  191. speakerInterrupt:
  192. action:
  193. - service: media_player.media_stop
  194. data:
  195. entity_id: "media_player.kodi"
  196. nextSong:
  197. action:
  198. - service: media_player.media_next_track
  199. data:
  200. entity_id: "media_player.kodi"
  201. turnOffTV:
  202. action:
  203. - service: media_player.kodi_call_method
  204. data:
  205. entity_id: media_player.kodi
  206. method: System.Shutdown