configuration.yaml 7.2 KB

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