egordanilenko

Home Assistant + ZONT

Oct 30th, 2020
1,088
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.12 KB | None | 0 0
  1. #configuration.yaml
  2.  
  3. # Configure a default setup of Home Assistant (frontend, api, etc)
  4. default_config:
  5. # Text to speech
  6. tts:
  7.   - platform: google_translate
  8.  
  9. mqtt:
  10.   broker: #адрес брокера, скрыт
  11.   discovery: true
  12.  
  13. group: !include groups.yaml
  14. automation: !include automations.yaml
  15. script: !include scripts.yaml
  16. scene: !include scenes.yaml
  17.  
  18. #Doc: The following example allows to have subfolders in the packages folder, which could make managing multiple packages easier by grouping:
  19. # убедитесь что будет заинклюжены конфиги из каталога packages
  20. homeassistant:
  21.   packages: !include_dir_merge_named packages
  22.  
  23. #рабочий пример с zont
  24. # файл packages/climate/climate.yaml
  25. climate_heating:
  26.   sensor:
  27.     - platform: rest
  28.       resource: https://zont-online.ru/api/devices
  29.       name: zont
  30.       method: POST
  31.       timeout: 30
  32.       scan_interval: 10
  33.       force_update: true
  34.       headers:
  35.         X-ZONT-Client: !secret x_zont_client
  36.         X-ZONT-Token: !secret x_zont_token
  37.         Content-Type: application/json
  38.       payload: '{"load_io": true}'
  39.       value_template: '{{ value_json.ok }}'
  40.       json_attributes:
  41.        - devices        
  42.     - platform: template
  43.       sensors:      
  44.         zont_boiler_room:        
  45.           value_template: "{{ state_attr('sensor.zont','devices')[0].thermometers[0].last_value }}"
  46.           device_class: temperature
  47.           friendly_name: 'Мастерская'
  48.           unit_of_measurement: '°C'
  49.     - platform: template
  50.       sensors:
  51.         zont_outdoor:        
  52.           value_template: "{{ state_attr('sensor.zont','devices')[0].thermometers[1].last_value }}"
  53.           device_class: temperature
  54.           friendly_name: 'Улица'
  55.           unit_of_measurement: '°C'
  56.     - platform: template
  57.       sensors:
  58.         zont_heat_agent:        
  59.           value_template: "{{ state_attr('sensor.zont','devices')[0].thermometers[2].last_value }}"
  60.           device_class: temperature
  61.           friendly_name: 'Теплоноситель'
  62.           unit_of_measurement: '°C'  
Add Comment
Please, Sign In to add comment