configuration.yaml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. # this file goes in ~homeassistant/.homeassistant/
  2. homeassistant:
  3. name: Home
  4. latitude: 52.1187
  5. longitude: 5.0994
  6. elevation: 0
  7. unit_system: metric
  8. time_zone: Europe/Dublin
  9. customize: !include customize.yaml
  10. # Configure a default setup of Home Assistant (frontend, api, etc)
  11. default_config:
  12. # Show the introduction message on startup.
  13. #introduction:
  14. # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  15. # http:
  16. # base_url: example.duckdns.org:8123
  17. zwave:
  18. usb_path: /dev/ttyACM0 # determine using $ dmesg | grep tty
  19. # device_config: !include zwave_device_config.yaml
  20. network_key: "0xb2, 0x0d, 0x62, 0x9b, 0x7c, 0x91, 0x6e, 0xeb, 0xe8, 0x45, 0x9a, 0x96, 0x7e, 0x5b, 0x43, 0xe9"
  21. debug: false
  22. sensor:
  23. - platform: yr
  24. name: weather
  25. latitude: 53.386637
  26. longitude: -6.131277
  27. monitored_conditions:
  28. - temperature
  29. - symbol
  30. - precipitation
  31. - windSpeed
  32. # - pressure
  33. - windDirection
  34. # - humidity
  35. # - fog
  36. - cloudiness
  37. # - lowClouds
  38. # - mediumClouds
  39. # - highClouds
  40. # - dewpointTemperature
  41. # used for snips
  42. # mqtt:
  43. # broker: localhost
  44. #tts:
  45. # - platform: google
  46. # media_player:
  47. # - platform: kodi
  48. # host: tv
  49. # port: 8080
  50. # tcp_port: 9090
  51. # username: kodi
  52. # password: kodi
  53. # timeout: 10
  54. # enable_websocket: false
  55. script:
  56. # test_function:
  57. # sequence:
  58. # - service: system_log.write
  59. # data_template:
  60. # message: Test 1 ({{duration}})...
  61. # - delay: '{{duration}}'
  62. # - service: system_log.write
  63. # data:
  64. # message: Test 2...
  65. automation:
  66. - alias: Log motion detection status
  67. initial_state: false
  68. trigger:
  69. platform: event
  70. event_type: time_changed
  71. condition:
  72. condition: template
  73. value_template: "{{ now().second % 10 == 0 }}"
  74. action:
  75. - service: system_log.write
  76. data_template:
  77. message: "sensor.aeotec_multisensor_6_burglar state: {{ states('sensor.aeotec_multisensor_6_burglar') }}"
  78. - alias: Turn on hallway light (motion)
  79. initial_state: true
  80. trigger:
  81. - platform: state
  82. entity_id: sensor.aeotec_multisensor_6_burglar
  83. from: "0"
  84. to: "8"
  85. - platform: state
  86. entity_id: sensor.aeotec_multisensor_6_burglar
  87. from: "3"
  88. to: "8"
  89. action:
  90. - service: system_log.write
  91. data:
  92. message: "***** State to 8 -- turn on hallway light"
  93. - service: homeassistant.turn_on
  94. entity_id: switch.wenzhou_tkb_0
  95. - alias: Turn off hallway light (midnight timer)
  96. trigger:
  97. platform: time_pattern
  98. hours: '0'
  99. minutes: '0'
  100. action:
  101. - service: system_log.write
  102. data:
  103. message: "Midnight -- turning off the hallway light"
  104. - service: homeassistant.turn_off
  105. entity_id: switch.wenzhou_tkb_0
  106. - alias: Turn off hallway light (no motion)
  107. initial_state: true
  108. trigger:
  109. - platform: state
  110. entity_id: sensor.aeotec_multisensor_6_burglar
  111. from: "8"
  112. to: "0"
  113. for:
  114. minutes: 1
  115. - platform: state
  116. entity_id: sensor.aeotec_multisensor_6_burglar
  117. from: "3"
  118. to: "0"
  119. for:
  120. minutes: 1
  121. condition:
  122. - condition: time
  123. after: '00:00:00'
  124. before: '16:00:00'
  125. action:
  126. - service: system_log.write
  127. data:
  128. message: "***** Turning off the hallway light"
  129. - service: homeassistant.turn_off
  130. entity_id: switch.wenzhou_tkb_0
  131. # - alias: water immersion (weekdays)
  132. # initial_state: false
  133. # trigger:
  134. # - platform: time
  135. # at: '23:01:00'
  136. # condition:
  137. # condition: time
  138. # weekday:
  139. # - mon
  140. # - tue
  141. # - wed
  142. # - thu
  143. # - fri
  144. # action:
  145. # - service: script.test_function
  146. # data:
  147. # duration: '00:00:10'
  148. # - alias: Turn on kitchen light when there is movement
  149. # initial_state: true
  150. # trigger:
  151. # - platform: state
  152. # entity_id: sensor.aeotec_multisensor_6_burglar
  153. # from: "0"
  154. # to: "8"
  155. # - platform: state
  156. # entity_id: sensor.aeotec_multisensor_6_burglar
  157. # from: "3"
  158. # to: "8"
  159. # action:
  160. # - service: system_log.write
  161. # data:
  162. # message: "***** State to 8"
  163. # - service: snips.say
  164. # data:
  165. # text: on, on, on
  166. # - alias: Turn off kitchen light 10 minutes after last movement
  167. # initial_state: true
  168. # trigger:
  169. # - platform: state
  170. # entity_id: sensor.aeotec_multisensor_6_burglar
  171. # from: "8"
  172. # to: "0"
  173. # for:
  174. # minutes: 2
  175. # - platform: state
  176. # entity_id: sensor.aeotec_multisensor_6_burglar
  177. # from: "3"
  178. # to: "0"
  179. # for:
  180. # minutes: 2
  181. # action:
  182. # - service: system_log.write
  183. # data:
  184. # message: "***** State to 0"
  185. # - service: snips.say
  186. # data:
  187. # text: off, off, off
  188. # snips:
  189. # intent_script:
  190. # hello:
  191. # - service: persistent_notification.create
  192. # data:
  193. # message: ":-)"
  194. # title: "Hello Miranda!"
  195. # notification_id: "hello-notification"
  196. # action:
  197. # - service: script.kodi_play_artist
  198. # data:
  199. # a: "1"
  200. # timeNow:
  201. # action:
  202. # - service: snips.say
  203. # data_template:
  204. # text: >
  205. # {{now().hour % 12}} {% if now().minute < 10 %}oh{% endif %} {{now().minute}}
  206. # bye:
  207. # action:
  208. # - service: script.test_function
  209. # data:
  210. # duration: '00:00:10'
  211. # playArtist:
  212. # action:
  213. # - service: system_log.write
  214. # data_template:
  215. # message: >
  216. # Playing {{artist_name}}...
  217. # - service: snips.say
  218. # data_template:
  219. # text: >
  220. # Playing {{artist_name}}
  221. # - service: media_player.play_media
  222. # data:
  223. # entity_id: "media_player.kodi"
  224. # media_content_type: "music"
  225. # media_content_id: "/mnt/nas/music/misc/15-seconds-of-silence.mp3"
  226. # - service: media_player.clear_playlist
  227. # data:
  228. # entity_id: "media_player.kodi"
  229. # - service: media_player.kodi_add_to_playlist
  230. # data_template:
  231. # entity_id: "media_player.kodi"
  232. # media_type: "ALBUM"
  233. # media_name: "ALL"
  234. # artist_name: >
  235. # {{artist_name}}
  236. # - service: media_player.media_next_track
  237. # data:
  238. # entity_id: "media_player.kodi"
  239. # - service: system_log.write
  240. # data:
  241. # message: Done.
  242. # speakerInterrupt:
  243. # action:
  244. # - service: media_player.media_stop
  245. # data:
  246. # entity_id: "media_player.kodi"
  247. # nextSong:
  248. # action:
  249. # - service: media_player.media_next_track
  250. # data:
  251. # entity_id: "media_player.kodi"
  252. # turnOffTV:
  253. # action:
  254. # - service: media_player.kodi_call_method
  255. # data:
  256. # entity_id: media_player.kodi
  257. # method: System.Shutdown