configuration.yaml 7.4 KB

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