configuration.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. sensor:
  23. # Weather prediction
  24. # - platform: yr
  25. # - platform: time_date
  26. # display_options:
  27. # - 'time'
  28. mqtt:
  29. broker: localhost
  30. #tts:
  31. # - platform: google
  32. media_player:
  33. - platform: kodi
  34. host: tv
  35. port: 8080
  36. tcp_port: 9090
  37. username: kodi
  38. password: kodi
  39. timeout: 10
  40. enable_websocket: false
  41. script:
  42. # kodi_play_artist:
  43. # sequence:
  44. # - service: system_log.write
  45. # data_template:
  46. # message: >
  47. # play {{artist_name}}
  48. # - service: snips.say
  49. # data_template:
  50. # text: >
  51. # Playing {{artist_name}}
  52. # - service: media_player.play_media
  53. # data:
  54. # entity_id: "media_player.kodi"
  55. # media_content_type: "music"
  56. # media_content_id: "/mnt/nas/music/misc/15-seconds-of-silence.mp3"
  57. # - service: media_player.clear_playlist
  58. # data:
  59. # entity_id: "media_player.kodi"
  60. # - service: media_player.kodi_add_to_playlist
  61. # data_template:
  62. # entity_id: "media_player.kodi"
  63. # media_type: "ALBUM"
  64. # media_name: "ALL"
  65. # artist_name: >
  66. # {{artist_name}}
  67. # - service: media_player.media_next_track
  68. # data:
  69. # entity_id: "media_player.kodi"
  70. # - service: system_log.write
  71. # data:
  72. # message: done
  73. snips:
  74. intent_script:
  75. # hello:
  76. # - service: persistent_notification.create
  77. # data:
  78. # message: ":-)"
  79. # title: "Hello Miranda!"
  80. # notification_id: "hello-notification"
  81. # action:
  82. # - service: script.kodi_play_artist
  83. # data:
  84. # a: "1"
  85. # b: "2"
  86. timeNow:
  87. action:
  88. - service: snips.say
  89. data_template:
  90. text: >
  91. {{now().hour % 12}} {{now().minute}}
  92. bye:
  93. action:
  94. - service: homeassistant.restart
  95. playArtist:
  96. action:
  97. - service: system_log.write
  98. data_template:
  99. message: >
  100. Playing {{artist_name}}...
  101. - service: snips.say
  102. data_template:
  103. text: >
  104. Playing {{artist_name}}
  105. - service: media_player.play_media
  106. data:
  107. entity_id: "media_player.kodi"
  108. media_content_type: "music"
  109. media_content_id: "/mnt/nas/music/misc/15-seconds-of-silence.mp3"
  110. - service: media_player.clear_playlist
  111. data:
  112. entity_id: "media_player.kodi"
  113. - service: media_player.kodi_add_to_playlist
  114. data_template:
  115. entity_id: "media_player.kodi"
  116. media_type: "ALBUM"
  117. media_name: "ALL"
  118. artist_name: >
  119. {{artist_name}}
  120. - service: media_player.media_next_track
  121. data:
  122. entity_id: "media_player.kodi"
  123. - service: system_log.write
  124. data:
  125. message: Done.
  126. speakerInterrupt:
  127. action:
  128. - service: media_player.media_stop
  129. data:
  130. entity_id: "media_player.kodi"
  131. nextSong:
  132. action:
  133. - service: media_player.media_next_track
  134. data:
  135. entity_id: "media_player.kodi"
  136. turnOffTV:
  137. action:
  138. - service: media_player.kodi_call_method
  139. data:
  140. entity_id: media_player.kodi
  141. method: System.Shutdown
  142. group: !include groups.yaml
  143. automation: !include automations.yaml
  144. #script: !include scripts.yaml