| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309 |
- # this file goes in ~homeassistant/.homeassistant/
- # scp ~/workspaces/vscode/home-assistance/hass/confs/configuration.yaml homeassistant@hass:~/.homeassistant/
- # scp ~/workspaces/vscode/home-assistance/hass/confs/lovelace.json homeassistant@hass:~/.homeassistant/.storage/lovelace
- # ssh hass
- # sudo systemctl restart home-assistant@homeassistant && sudo journalctl -f -u home-assistant@homeassistant
- homeassistant:
- name: Home
- latitude: 47.1662
- longitude: 8.5155
- elevation: 425
- unit_system: metric
- time_zone: Europe/Zurich
- # customize: !include customize.yaml
- # Configure a default setup of Home Assistant (frontend, api, etc)
- default_config:
- # Show the introduction message on startup.
- #introduction:
- # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
- # http:
- # base_url: example.duckdns.org:8123
- zwave:
- usb_path: /dev/ttyACM0 # determine using $ dmesg | grep tty
- # device_config: !include zwave_device_config.yaml
- network_key: "0xb2, 0x0d, 0x62, 0x9b, 0x7c, 0x91, 0x6e, 0xeb, 0xe8, 0x45, 0x9a, 0x96, 0x7e, 0x5b, 0x43, 0xe9"
- debug: false
- sensor:
- # - platform: yr
- # name: weather
- # latitude: 53.386637
- # longitude: -6.131277
- # monitored_conditions:
- # - temperature
- # - symbol
- # - precipitation
- # - windSpeed
- # # - pressure
- # - windDirection
- # # - humidity
- # # - fog
- # - cloudiness
- # # - lowClouds
- # # - mediumClouds
- # # - highClouds
- # # - dewpointTemperature
- - platform: template
- sensors:
- solar_angle:
- unit_of_measurement: 'degrees'
- value_template: "{{ state_attr('sun.sun', 'elevation') }}"
- # used for snips
- # mqtt:
- # broker: localhost
- #tts:
- # - platform: google
- # media_player:
- # - platform: kodi
- # host: tv
- # port: 8080
- # tcp_port: 9090
- # username: kodi
- # password: kodi
- # timeout: 10
- # enable_websocket: false
- script:
- lights_on:
- sequence:
- - service: homeassistant.turn_on
- entity_id: switch.wenzhou_tkb_0
- lights_off:
- sequence:
- - service: homeassistant.turn_off
- entity_id: switch.wenzhou_tkb_0
- automation:
- # - alias: Turn off lights (time, partial)
- # trigger:
- # platform: time_pattern
- # hours: '01'
- # minutes: '00'
- # action:
- # - service: script.lights_off_partial
- - alias: Turn off lights (time)
- trigger:
- platform: time_pattern
- hours: '23'
- minutes: '30'
- action:
- - service: script.lights_off
- - alias: Turn on lights (solar)
- trigger:
- platform: numeric_state
- entity_id: sun.sun
- attribute: elevation
- below: 35
- # 30 min past sunset
- # trigger:
- # platform: sun
- # event: sunset
- # offset: "00:30:00"
- # trigger:
- # platform: time_pattern
- # hours: '16'
- # minutes: '00'
- # condition:
- # - condition: numeric_state
- # entity_id: sensor.solar_angle
- # below: 0
- action:
- - service: script.lights_on
- # - alias: Log motion detection status
- # initial_state: false
- # trigger:
- # platform: event
- # event_type: time_changed
- # condition:
- # condition: template
- # value_template: "{{ now().second % 10 == 0 }}"
- # action:
- # - service: system_log.write
- # data_template:
- # message: "sensor.aeon_labs_zw100_multisensor_6_burglar state: {{ states('sensor.aeon_labs_zw100_multisensor_6_burglar') }}"
- - alias: Turn on lights (motion)
- initial_state: true
- trigger:
- - platform: state
- entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
- from: "0"
- to: "8"
- - platform: state
- entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
- from: "3"
- to: "8"
- condition:
- - condition: numeric_state
- entity_id: sensor.solar_angle
- below: 0
- action:
- - service: script.lights_on
- - alias: Turn off lights (no motion)
- initial_state: true
- trigger:
- - platform: state
- entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
- from: "8"
- to: "0"
- for:
- minutes: 3
- - platform: state
- entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
- from: "3"
- to: "0"
- for:
- minutes: 3
- condition:
- - condition: time
- after: '23:30:00'
- before: '08:00:00'
- action:
- - service: script.lights_off
- # - alias: water immersion (weekdays)
- # initial_state: false
- # trigger:
- # - platform: time
- # at: '23:01:00'
- # condition:
- # condition: time
- # weekday:
- # - mon
- # - tue
- # - wed
- # - thu
- # - fri
- # action:
- # - service: script.test_function
- # data:
- # duration: '00:00:10'
- # - alias: Turn on kitchen light when there is movement
- # initial_state: true
- # trigger:
- # - platform: state
- # entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
- # from: "0"
- # to: "8"
- # - platform: state
- # entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
- # from: "3"
- # to: "8"
- # action:
- # - service: system_log.write
- # data:
- # message: "***** State to 8"
- # - service: snips.say
- # data:
- # text: on, on, on
- # - alias: Turn off kitchen light 10 minutes after last movement
- # initial_state: true
- # trigger:
- # - platform: state
- # entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
- # from: "8"
- # to: "0"
- # for:
- # minutes: 2
- # - platform: state
- # entity_id: sensor.aeon_labs_zw100_multisensor_6_burglar
- # from: "3"
- # to: "0"
- # for:
- # minutes: 2
- # action:
- # - service: system_log.write
- # data:
- # message: "***** State to 0"
- # - service: snips.say
- # data:
- # text: off, off, off
- # snips:
- # intent_script:
- # hello:
- # - service: persistent_notification.create
- # data:
- # message: ":-)"
- # title: "Hello Miranda!"
- # notification_id: "hello-notification"
- # action:
- # - service: script.kodi_play_artist
- # data:
- # a: "1"
- # timeNow:
- # action:
- # - service: snips.say
- # data_template:
- # text: >
- # {{now().hour % 12}} {% if now().minute < 10 %}oh{% endif %} {{now().minute}}
- # bye:
- # action:
- # - service: script.test_function
- # data:
- # duration: '00:00:10'
- # playArtist:
- # action:
- # - service: system_log.write
- # data_template:
- # message: >
- # Playing {{artist_name}}...
- # - service: snips.say
- # data_template:
- # text: >
- # Playing {{artist_name}}
- # - service: media_player.play_media
- # data:
- # entity_id: "media_player.kodi"
- # media_content_type: "music"
- # media_content_id: "/mnt/nas/music/misc/15-seconds-of-silence.mp3"
- # - service: media_player.clear_playlist
- # data:
- # entity_id: "media_player.kodi"
- # - service: media_player.kodi_add_to_playlist
- # data_template:
- # entity_id: "media_player.kodi"
- # media_type: "ALBUM"
- # media_name: "ALL"
- # artist_name: >
- # {{artist_name}}
- # - service: media_player.media_next_track
- # data:
- # entity_id: "media_player.kodi"
- # - service: system_log.write
- # data:
- # message: Done.
- # speakerInterrupt:
- # action:
- # - service: media_player.media_stop
- # data:
- # entity_id: "media_player.kodi"
- # nextSong:
- # action:
- # - service: media_player.media_next_track
- # data:
- # entity_id: "media_player.kodi"
- # turnOffTV:
- # action:
- # - service: media_player.kodi_call_method
- # data:
- # entity_id: media_player.kodi
- # method: System.Shutdown
-
|