Advertisement
Guest User

Untitled

a guest
Apr 5th, 2019
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 16.24 KB | None | 0 0
  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: 49.0342
  6.   longitude: 8.716
  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/Berlin
  13.   # Customization file
  14.   customize: !include customize.yaml
  15.  
  16. http:
  17.  # Secrets are defined in the file secrets.yaml
  18.   # api_password: !secret http_password
  19.   # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  20.   # base_url: example.duckdns.org:8123
  21.  
  22.   #ssl_certificate: /usr/share/hassio/homeassistant/ssl/certificate.pem
  23.   #ssl_key: /usr/share/hassio/homeassistant/ssl/privkey.pem
  24.  
  25. recorder:
  26.   purge_keep_days: 5
  27.   db_url: mysql://hass:hass@192.168.1.80/hass?charset=utf8
  28.  
  29.  
  30. # Enables the frontend
  31. frontend:
  32. panel_iframe:
  33.   configurator:
  34.     title: Configurator
  35.     icon: mdi:wrench
  36.     url: http://192.168.1.210:3218
  37.   homepanel:
  38.     title: Home-Panel
  39.     icon: mdi:mdi:home-account
  40.     url: http://192.168.1.210:8234
  41.   pihole:
  42.     title: Pi-hole
  43.     icon: mdi:block-helper
  44.     url: http://192.168.1.210:4865
  45.   logviewer:
  46.     title: Log Viewer
  47.     icon: mdi:view-headline
  48.     url: http://192.168.1.210:4277/
  49. config:
  50. # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  51. # http:
  52. #   base_url: example.duckdns.org:8123
  53.  
  54.  
  55. cloud:
  56.   alexa:
  57.     filter:
  58.       include_entities:
  59.        - light.kuchnia_swiatlo
  60.       include_domains:
  61.        - switch
  62.     entity_config:
  63.       light.kuchnia_swiatlo:
  64.         name: Licht
  65.         description: The light in the kitchen
  66.       switch.stairs:
  67.         display_categories: LIGHT
  68.  
  69. # mqtt:
  70.   # broker: 192.168.1.90
  71.   # port: 1883
  72.   # discovery: true
  73.   # discovery_prefix: /
  74.   # client_id: HASS
  75.   # birth_message:
  76.     # topic: 'hass/status'
  77.     # payload: 'online'
  78.   # will_message:
  79.     # topic: 'hass/status'
  80.     # payload: 'offline'
  81.  
  82. rflink:
  83.   port: /dev/ttyACM1
  84.    
  85. logger:
  86.   default: info
  87.   logs:
  88.     sensor.qnap: debug
  89.     homeassistant.components.sensor.qnap: debug
  90.     mqtt: debug
  91.     homeassistant.components.mqtt: debug
  92.     rflink: debug
  93.     homeassistant.components.rflink: debug
  94.    
  95. # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  96. # http:
  97. #   base_url: example.duckdns.org:8123
  98.  
  99. # Checks for available updates
  100. # Note: This component will send some information about your system to
  101. # the developers to assist with development of Home Assistant.
  102. # For more information, please see:
  103. # https://home-assistant.io/blog/2016/10/25/explaining-the-updater/
  104. updater:
  105.  # Optional, allows Home Assistant developers to focus on popular components.
  106.   # include_used_components: true
  107.  
  108. # Discover some devices automatically
  109. discovery:
  110. # Allows you to issue voice commands from the frontend in enabled browsers
  111. conversation:
  112. # Enables support for tracking state changes over time
  113. history:
  114.   include:
  115.     domains:
  116.      - sensor
  117.       - switch
  118.   exclude:
  119.     entities:
  120.     - sensor.systemmonitor
  121.      - sensor.qnap
  122.  
  123. # View all events in a logbook
  124. logbook:
  125. # Enables a map showing the location of tracked devices
  126. map:
  127. # Track the sun
  128. sun:
  129. # Allow diagnosing system problems
  130. system_health:
  131. # Sensors
  132. sensor:
  133.   - platform: systemmonitor
  134.     resources:
  135.       - type: disk_use_percent
  136.         arg: /home
  137.       - type: memory_free
  138.       - type: memory_use
  139.       - type: processor_use
  140.       - type: last_boot
  141.  
  142.   - platform: qnap
  143.     host: 192.168.1.100
  144.     port: 8181
  145.     username: hass
  146.     password: hasshass
  147.     monitored_conditions:
  148.      - status
  149.       - cpu_usage
  150.       - memory_percent_used
  151.       - network_tx
  152.       - volume_percentage_used
  153. # Weather prediction
  154.  
  155. #Czujniki temperatury
  156. #Dwór  
  157.   - platform: rflink
  158.     automatic_add: true
  159.  
  160.   - platform: mqtt
  161.     state_topic: "/akwarium/tempwody/Temperature"
  162.     name: "Temperatura wody"
  163.     unit_of_measurement: "°C"
  164.     device_class: "temperature"
  165.  
  166.   # - platform: mqtt
  167.     # state_topic: "/akwarium/sypialniaakwa/Temperature"
  168.     # name: "Temperatura obok akwa"
  169.     # unit_of_measurement: "°C"
  170.     # device_class: "temperature"
  171.  
  172.   # - platform: mqtt
  173.     # state_topic: "/akwarium/sypialniaakwa/Pressure"
  174.     # name: "Ciśń. obok akwa"
  175.     # unit_of_measurement: "hPa"
  176.     # device_class: "pressure"
  177.    
  178.   - platform: "mqtt"
  179.     name: Drzwi
  180.     state_topic: "/zigbee/DrzwiWejsciowe"
  181.     availability_topic: "/zigbee/bridge/state"
  182.     value_template: "{{ value_json.contact }}"
  183.        
  184.   - platform: "mqtt"
  185.     name: Temp. Dwór
  186.     state_topic: "/zigbee/Dwor"
  187.     availability_topic: "/zigbee/bridge/state"
  188.     unit_of_measurement: "°C"
  189.     device_class: "temperature"
  190.     value_template: "{{ value_json.temperature }}"
  191.    
  192.   - platform: "mqtt"
  193.     name: Router model
  194.     state_topic: "/zigbee/Router"
  195.     availability_topic: "/zigbee/bridge/state"
  196.     value_template: "{{ value_json.model }}"
  197.        
  198.   - platform: "mqtt"
  199.     name: Router SW
  200.     state_topic: "/zigbee/Router"
  201.     availability_topic: "/zigbee/bridge/state"
  202.     value_template: "{{ value_json.sw_version }}"
  203.    
  204.   - platform: "mqtt"
  205.     name: Wilg. Dwór
  206.     state_topic: "/zigbee/Dwor"
  207.     availability_topic: "/zigbee/bridge/state"
  208.     unit_of_measurement: "%"
  209.     device_class: "humidity"
  210.     value_template: "{{ value_json.humidity }}"
  211.  
  212.   - platform: "mqtt"
  213.     name: Ciśń. Dwór
  214.     state_topic: "/zigbee/Dwor"
  215.     availability_topic: "/zigbee/bridge/state"
  216.     unit_of_measurement: "hPa"
  217.     device_class: "pressure"
  218.     value_template: "{{ value_json.pressure }}"
  219.  
  220.   - platform: "mqtt"
  221.     name: Bat. Dwór
  222.     state_topic: "/zigbee/Dwor"
  223.     availability_topic: "/zigbee/bridge/state"
  224.     unit_of_measurement: "Bat"
  225.     device_class: "battery"
  226.     value_template: "{{ value_json.battery }}"
  227.  
  228.   - platform: "mqtt"
  229.     name: Quality Dwór
  230.     state_topic: "/zigbee/Dwor"
  231.     availability_topic: "/zigbee/bridge/state"
  232.     unit_of_measurement: "dB"
  233.  
  234.     value_template: "{{ value_json.linkquality }}"
  235.    
  236. #Kuchnia  
  237.   - platform: "mqtt"
  238.     name: Temp. Kuchnia
  239.     state_topic: "/zigbee/Kuchnia"
  240.     availability_topic: "/zigbee/bridge/state"
  241.     unit_of_measurement: "°C"
  242.     device_class: "temperature"
  243.     value_template: "{{ value_json.temperature }}"
  244.        
  245.   - platform: "mqtt"
  246.     name: Wilg. Kuchnia
  247.     state_topic: "/zigbee/Kuchnia"
  248.     availability_topic: "/zigbee/bridge/state"
  249.     unit_of_measurement: "%"
  250.     device_class: "humidity"
  251.     value_template: "{{ value_json.humidity }}"
  252.  
  253.   - platform: "mqtt"
  254.     name: Ciśń. Kuchnia
  255.     state_topic: "/zigbee/Kuchnia"
  256.     availability_topic: "/zigbee/bridge/state"
  257.     unit_of_measurement: "hPa"
  258.     device_class: "pressure"
  259.     value_template: "{{ value_json.pressure }}"
  260.  
  261.   - platform: "mqtt"
  262.     name: Bat. Kuchnia
  263.     state_topic: "/zigbee/Kuchnia"
  264.     availability_topic: "/zigbee/bridge/state"
  265.     unit_of_measurement: "Bat"
  266.     device_class: "battery"
  267.     value_template: "{{ value_json.battery }}"
  268.  
  269.   - platform: "mqtt"
  270.     name: Quality Kuchnia
  271.     state_topic: "/zigbee/Kuchnia"
  272.     availability_topic: "/zigbee/bridge/state"
  273.     unit_of_measurement: "dB"
  274.     value_template: "{{ value_json.linkquality }}"
  275.        
  276. #Akwarium
  277.   - platform: "mqtt"
  278.     name: Temp. Akwarium
  279.     state_topic: "/zigbee/Akwarium"
  280.     availability_topic: "/zigbee/bridge/state"
  281.     unit_of_measurement: "°C"
  282.     device_class: "temperature"
  283.     value_template: "{{ value_json.temperature }}"
  284.  
  285.   - platform: "mqtt"
  286.     name: Wilg. Akwarium
  287.     state_topic: "/zigbee/Akwarium"
  288.     availability_topic: "/zigbee/bridge/state"
  289.     unit_of_measurement: "%"
  290.     device_class: "humidity"
  291.     value_template: "{{ value_json.humidity }}"
  292.  
  293.   - platform: "mqtt"
  294.     name: Ciśń. Akwarium
  295.     state_topic: "/zigbee/Akwarium"
  296.     availability_topic: "/zigbee/bridge/state"
  297.     unit_of_measurement: "hPa"
  298.     device_class: "pressure"
  299.     value_template: "{{ value_json.pressure }}"
  300.  
  301.   - platform: "mqtt"
  302.     name: Bat. Akwarium
  303.     state_topic: "/zigbee/Akwarium"
  304.     availability_topic: "/zigbee/bridge/state"
  305.     unit_of_measurement: "Bat"
  306.     device_class: "battery"
  307.     value_template: "{{ value_json.battery }}"
  308.  
  309.   - platform: "mqtt"
  310.     name: Quality Akwarium
  311.     state_topic: "/zigbee/Akwarium"
  312.     availability_topic: "/zigbee/bridge/state"
  313.     unit_of_measurement: "dB"
  314.     value_template: "{{ value_json.linkquality }}"
  315.            
  316. #Salon
  317.   - platform: "mqtt"
  318.     name: Temp. Salon
  319.     state_topic: "/zigbee/Salon"
  320.     availability_topic: "/zigbee/bridge/state"
  321.     unit_of_measurement: "°C"
  322.     device_class: "temperature"
  323.     value_template: "{{ value_json.temperature }}"
  324.  
  325.   - platform: "mqtt"
  326.     name: Wilg. Salon
  327.     state_topic: "/zigbee/Salon"
  328.     availability_topic: "/zigbee/bridge/state"
  329.     unit_of_measurement: "%"
  330.     device_class: "humidity"
  331.     value_template: "{{ value_json.humidity }}"
  332.  
  333.   - platform: "mqtt"
  334.     name: Ciśń. Salon
  335.     state_topic: "/zigbee/Salon"
  336.     availability_topic: "/zigbee/bridge/state"
  337.     unit_of_measurement: "hPa"
  338.     device_class: "pressure"
  339.     value_template: "{{ value_json.pressure }}"
  340.  
  341.   - platform: "mqtt"
  342.     name: Bat. Salon
  343.     state_topic: "/zigbee/Salon"
  344.     availability_topic: "/zigbee/bridge/state"
  345.     unit_of_measurement: "Bat"
  346.     device_class: "battery"
  347.     value_template: "{{ value_json.battery }}"
  348.  
  349.   - platform: "mqtt"
  350.     name: Quality Salon
  351.     state_topic: "/zigbee/Salon"
  352.     availability_topic: "/zigbee/bridge/state"
  353.     unit_of_measurement: "dB"
  354.     value_template: "{{ value_json.linkquality }}"
  355.            
  356. #Sypialnia
  357.   - platform: "mqtt"
  358.     name: Temp. Sypialnia
  359.     state_topic: "/zigbee/Sypialnia"
  360.     availability_topic: "/zigbee/bridge/state"
  361.     unit_of_measurement: "°C"
  362.     device_class: "temperature"
  363.     value_template: "{{ value_json.temperature }}"
  364.  
  365.   - platform: "mqtt"
  366.     name: Wilg. Sypialnia
  367.     state_topic: "/zigbee/Sypialnia"
  368.     availability_topic: "/zigbee/bridge/state"
  369.     unit_of_measurement: "%"
  370.     device_class: "humidity"
  371.     value_template: "{{ value_json.humidity }}"
  372.  
  373.   - platform: "mqtt"
  374.     name: Ciśń. Sypialnia
  375.     state_topic: "/zigbee/Sypialnia"
  376.     availability_topic: "/zigbee/bridge/state"
  377.     unit_of_measurement: "hPa"
  378.     device_class: "pressure"
  379.     value_template: "{{ value_json.pressure -10 }}"
  380.  
  381.   - platform: "mqtt"
  382.     name: Bat. Sypialnia
  383.     state_topic: "/zigbee/Sypialnia"
  384.     availability_topic: "/zigbee/bridge/state"
  385.     unit_of_measurement: "Bat"
  386.     device_class: "battery"
  387.     value_template: "{{ value_json.battery }}"
  388.  
  389.   - platform: "mqtt"
  390.     name: Quality Sypialnia
  391.     state_topic: "/zigbee/Sypialnia"
  392.     availability_topic: "/zigbee/bridge/state"
  393.     unit_of_measurement: "dB"
  394.     value_template: "{{ value_json.linkquality }}"
  395.            
  396. #Toaleta
  397.   - platform: "mqtt"
  398.     name: Temp. Toaleta
  399.     state_topic: "/zigbee/Toaleta"
  400.     availability_topic: "/zigbee/bridge/state"
  401.     unit_of_measurement: "°C"
  402.     device_class: "temperature"
  403.     value_template: "{{ value_json.temperature }}"
  404.  
  405.   - platform: "mqtt"
  406.     name: Wilg. Toaleta
  407.     state_topic: "/zigbee/Toaleta"
  408.     availability_topic: "/zigbee/bridge/state"
  409.     unit_of_measurement: "%"
  410.     device_class: "humidity"
  411.     value_template: "{{ value_json.humidity }}"
  412.  
  413.   - platform: "mqtt"
  414.     name: Bat. Toaleta
  415.     state_topic: "/zigbee/Toaleta"
  416.     availability_topic: "/zigbee/bridge/state"
  417.     unit_of_measurement: "Bat"
  418.     device_class: "battery"
  419.     value_template: "{{ value_json.battery }}"
  420.  
  421.   - platform: "mqtt"
  422.     name: Quality Toaleta
  423.     state_topic: "/zigbee/Toaleta"
  424.     availability_topic: "/zigbee/bridge/state"
  425.     unit_of_measurement: "dB"
  426.     value_template: "{{ value_json.linkquality }}"
  427.  
  428.   - platform: yr
  429.  
  430.   - platform: mqtt
  431.     name: Status bramki /zigbee
  432.     state_topic: "/zigbee/bridge/state"
  433.     icon: mdi:router-wireless
  434.  
  435. # Pilot zdalnego sterowania
  436.   - platform: "mqtt"    
  437.     name: Dimmer
  438.     state_topic: "/zigbee/Dimmer"
  439.     availability_topic: "/zigbee/bridge/state"
  440.     icon: "mdi:gesture-double-tap"
  441.     value_template: "{{ value_json.action }}"
  442.     force_update: true
  443. # Pi Hole
  444.   - platform: pi_hole
  445.     host: 192.168.1.210:4865
  446.     monitored_conditions:
  447.      - ads_blocked_today
  448.       - dns_queries_today
  449.       - unique_clients
  450.    
  451. light:
  452.   - platform: "mqtt"
  453.     name: Kuchnia światło
  454.     state_topic: "/zigbee/KuchniaSwiatlo"
  455.     availability_topic: "/zigbee/bridge/state"
  456.     brightness: true
  457.     color_temp: true
  458.     schema: "json"
  459.     command_topic: "/zigbee/KuchniaSwiatlo/set"
  460.  
  461.  
  462. # Text to speech
  463. tts:
  464.   - platform: google
  465.  
  466. # Group
  467. group:
  468.   zigbee_group:
  469.     view: false
  470.     control: hidden
  471.     name: Zigbee2mqtt
  472.     entities:
  473.      - input_boolean.zigbee_permit_join
  474.       - timer.zigbee_permit_join
  475.       - sensor.zigbee2mqtt_bridge_state
  476.       - switch.zigbee2mqtt_main_join
  477.       - automation.enable_zigbee_joining
  478.       - automation.disable_zigbee_joining
  479.       - automation.disable_zigbee_joining_by_timer
  480.       - input_select.zigbee2mqtt_log_level
  481.       - automation.zigbee2mqtt_log_level
  482.  
  483. # Input select for Zigbee2mqtt debug level
  484. input_select:
  485.   zigbee2mqtt_log_level:
  486.     name: Zigbee2mqtt Log Level
  487.     options:
  488.     - debug
  489.      - info
  490.      - warn
  491.      - error
  492.     initial: info
  493.     icon: mdi:format-list-bulleted
  494.  
  495. # Input boolean for enabling/disabling joining
  496. input_boolean:
  497.   zigbee_permit_join:
  498.     name: Allow devices to join
  499.     initial: off
  500.     icon: mdi:cellphone-wireless
  501.  
  502. # Timer for joining time remaining (120 sec = 2 min)
  503. timer:
  504.   zigbee_permit_join:
  505.     name: Time remaining
  506.     duration: 240
  507.    
  508. # Switch for enabling joining
  509. switch:
  510.   - platform: mqtt
  511.     name: "Zigbee2mqtt Main join"
  512.     state_topic: "/zigbee/bridge/config/permit_join"
  513.     command_topic: "/zigbee/bridge/config/permit_join"
  514.     payload_on: "true"
  515.     payload_off: "false"
  516.    
  517.   - platform: rflink
  518.     automatic_add: true
  519.    
  520. # Automations
  521. automation:
  522.   - alias: Zigbee2mqtt Log Level
  523.     initial_state: 'on'
  524.     trigger:
  525.       - platform: state
  526.         entity_id: input_select.zigbee2mqtt_log_level
  527.         to: debug
  528.       - platform: state
  529.         entity_id: input_select.zigbee2mqtt_log_level
  530.         to: warn
  531.       - platform: state
  532.         entity_id: input_select.zigbee2mqtt_log_level
  533.         to: error
  534.       - platform: state
  535.         entity_id: input_select.zigbee2mqtt_log_level
  536.         to: info
  537.     action:
  538.       - service: mqtt.publish
  539.         data:
  540.           payload_template: '{{ states(''input_select.zigbee2mqtt_log_level'') }}'
  541.           topic: /zigbee/bridge/config/log_level
  542.  
  543.   - id: enable_zigbee_join
  544.     alias: Enable Zigbee joining
  545.     hide_entity: true
  546.     trigger:
  547.       platform: state
  548.       entity_id: input_boolean.zigbee_permit_join
  549.       to: 'on'
  550.     action:
  551.     - service: mqtt.publish
  552.       data:
  553.         topic: /zigbee/bridge/config/permit_join
  554.         payload: 'true'
  555.     - service: timer.start
  556.       data:
  557.         entity_id: timer.zigbee_permit_join
  558.  
  559.   - id: disable_zigbee_join
  560.     alias: Disable Zigbee joining
  561.     hide_entity: true
  562.     trigger:
  563.     - entity_id: input_boolean.zigbee_permit_join
  564.       platform: state
  565.       to: 'off'
  566.     action:
  567.     - data:
  568.         payload: 'false'
  569.         topic: /zigbee/bridge/config/permit_join
  570.       service: mqtt.publish
  571.     - data:
  572.         entity_id: timer.zigbee_permit_join
  573.       service: timer.cancel
  574.  
  575.   - id: disable_zigbee_join_timer
  576.     alias: Disable Zigbee joining by timer
  577.     hide_entity: true
  578.     trigger:
  579.     - platform: event
  580.       event_type: timer.finished
  581.       event_data:
  582.         entity_id: timer.zigbee_permit_join
  583.     action:
  584.     - service: mqtt.publish
  585.       data:
  586.         topic: /zigbee/bridge/config/permit_join
  587.         payload: 'false'
  588.     - service: input_boolean.turn_off
  589.       data:
  590.         entity_id: input_boolean.zigbee_permit_join
  591. # Text to speech
  592. #tts:
  593. #  - platform: google
  594.  
  595. #group: !include groups.yaml
  596. #automation: !include automations.yaml
  597. script: !include scripts.yaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement