configuration.yaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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. lights_off:
  57. sequence:
  58. - service: system_log.write
  59. data:
  60. message: "***** Turning off the lights"
  61. - service: homeassistant.turn_off
  62. entity_id: switch.wenzhou_tkb_0
  63. - service: homeassistant.turn_off
  64. entity_id: switch.wenzhou_tkb_1
  65. lights_on:
  66. sequence:
  67. - service: system_log.write
  68. data:
  69. message: "***** Turning on the lights"
  70. - service: homeassistant.turn_on
  71. entity_id: switch.wenzhou_tkb_0
  72. - service: homeassistant.turn_on
  73. entity_id: switch.wenzhou_tkb_1
  74. automation:
  75. - alias: Log motion detection status
  76. initial_state: false
  77. trigger:
  78. platform: event
  79. event_type: time_changed
  80. condition:
  81. condition: template
  82. value_template: "{{ now().second % 10 == 0 }}"
  83. action:
  84. - service: system_log.write
  85. data_template:
  86. message: "sensor.aeotec_multisensor_6_burglar state: {{ states('sensor.aeotec_multisensor_6_burglar') }}"
  87. - alias: Turn on hallway light (motion)
  88. initial_state: true
  89. trigger:
  90. - platform: state
  91. entity_id: sensor.aeotec_multisensor_6_burglar
  92. from: "0"
  93. to: "8"
  94. - platform: state
  95. entity_id: sensor.aeotec_multisensor_6_burglar
  96. from: "3"
  97. to: "8"
  98. condition:
  99. - condition: time
  100. after: '15:00:00'
  101. before: '08:00:00'
  102. action:
  103. - service: script.lights_on
  104. - alias: Turn off hallway light (midnight timer)
  105. trigger:
  106. platform: time_pattern
  107. hours: '0'
  108. minutes: '0'
  109. action:
  110. - service: script.lights_off
  111. - alias: Turn off hallway light (no motion)
  112. initial_state: true
  113. trigger:
  114. - platform: state
  115. entity_id: sensor.aeotec_multisensor_6_burglar
  116. from: "8"
  117. to: "0"
  118. for:
  119. minutes: 1
  120. - platform: state
  121. entity_id: sensor.aeotec_multisensor_6_burglar
  122. from: "3"
  123. to: "0"
  124. for:
  125. minutes: 1
  126. condition:
  127. - condition: time
  128. after: '00:00:00'
  129. before: '17:00:00'
  130. action:
  131. - service: script.lights_off
  132. # - alias: water immersion (weekdays)
  133. # initial_state: false
  134. # trigger:
  135. # - platform: time
  136. # at: '23:01:00'
  137. # condition:
  138. # condition: time
  139. # weekday:
  140. # - mon
  141. # - tue
  142. # - wed
  143. # - thu
  144. # - fri
  145. # action:
  146. # - service: script.test_function
  147. # data:
  148. # duration: '00:00:10'
  149. # - alias: Turn on kitchen light when there is movement
  150. # initial_state: true
  151. # trigger:
  152. # - platform: state
  153. # entity_id: sensor.aeotec_multisensor_6_burglar
  154. # from: "0"
  155. # to: "8"
  156. # - platform: state
  157. # entity_id: sensor.aeotec_multisensor_6_burglar
  158. # from: "3"
  159. # to: "8"
  160. # action:
  161. # - service: system_log.write
  162. # data:
  163. # message: "***** State to 8"
  164. # - service: snips.say
  165. # data:
  166. # text: on, on, on
  167. # - alias: Turn off kitchen light 10 minutes after last movement
  168. # initial_state: true
  169. # trigger:
  170. # - platform: state
  171. # entity_id: sensor.aeotec_multisensor_6_burglar
  172. # from: "8"
  173. # to: "0"
  174. # for:
  175. # minutes: 2
  176. # - platform: state
  177. # entity_id: sensor.aeotec_multisensor_6_burglar
  178. # from: "3"
  179. # to: "0"
  180. # for:
  181. # minutes: 2
  182. # action:
  183. # - service: system_log.write
  184. # data:
  185. # message: "***** State to 0"
  186. # - service: snips.say
  187. # data:
  188. # text: off, off, off
  189. # snips:
  190. # intent_script:
  191. # hello:
  192. # - service: persistent_notification.create
  193. # data:
  194. # message: ":-)"
  195. # title: "Hello Miranda!"
  196. # notification_id: "hello-notification"
  197. # action:
  198. # - service: script.kodi_play_artist
  199. # data:
  200. # a: "1"
  201. # timeNow:
  202. # action:
  203. # - service: snips.say
  204. # data_template:
  205. # text: >
  206. # {{now().hour % 12}} {% if now().minute < 10 %}oh{% endif %} {{now().minute}}
  207. # bye:
  208. # action:
  209. # - service: script.test_function
  210. # data:
  211. # duration: '00:00:10'
  212. # playArtist:
  213. # action:
  214. # - service: system_log.write
  215. # data_template:
  216. # message: >
  217. # Playing {{artist_name}}...
  218. # - service: snips.say
  219. # data_template:
  220. # text: >
  221. # Playing {{artist_name}}
  222. # - service: media_player.play_media
  223. # data:
  224. # entity_id: "media_player.kodi"
  225. # media_content_type: "music"
  226. # media_content_id: "/mnt/nas/music/misc/15-seconds-of-silence.mp3"
  227. # - service: media_player.clear_playlist
  228. # data:
  229. # entity_id: "media_player.kodi"
  230. # - service: media_player.kodi_add_to_playlist
  231. # data_template:
  232. # entity_id: "media_player.kodi"
  233. # media_type: "ALBUM"
  234. # media_name: "ALL"
  235. # artist_name: >
  236. # {{artist_name}}
  237. # - service: media_player.media_next_track
  238. # data:
  239. # entity_id: "media_player.kodi"
  240. # - service: system_log.write
  241. # data:
  242. # message: Done.
  243. # speakerInterrupt:
  244. # action:
  245. # - service: media_player.media_stop
  246. # data:
  247. # entity_id: "media_player.kodi"
  248. # nextSong:
  249. # action:
  250. # - service: media_player.media_next_track
  251. # data:
  252. # entity_id: "media_player.kodi"
  253. # turnOffTV:
  254. # action:
  255. # - service: media_player.kodi_call_method
  256. # data:
  257. # entity_id: media_player.kodi
  258. # method: System.Shutdown