Guest User

KMW_HA_REST

a guest
Jul 12th, 2023
1,146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.84 KB | None | 0 0
  1. #Kachelmannwetter jetzt
  2. rest:
  3. - authentication: basic
  4. scan_interval: 900
  5. resource_template: https://api.kachelmannwetter.com/v02/current/{{ state_attr('zone.home', 'latitude') | round(3) }}/{{ state_attr('zone.home', 'longitude') | round(3) }}?units=metric
  6. headers:
  7. Accept: application/json
  8. X-API-Key: !secret Kachelmannwetter
  9. sensor:
  10. - name: kmw_date
  11. value_template: '{{ value_json["data"].isDay["dateTime"] }}'
  12. - name: kmw_temp
  13. value_template: '{{ value_json["data"].temp["value"] }}'
  14. unit_of_measurement: "°C"
  15. - name: kmw_dew
  16. value_template: '{{ value_json["data"].dewpoint["value"] }}'
  17. unit_of_measurement: "°C"
  18. - name: kmw_hum
  19. value_template: '{{ value_json["data"].humidityRelative["value"] }}'
  20. unit_of_measurement: "%"
  21. - name: kmw_prec
  22. value_template: '{{ value_json["data"].prec1h["value"] }}'
  23. unit_of_measurement: "mm"
  24. - name: kmw_press
  25. value_template: '{{ value_json["data"].pressureMsl["value"] }}'
  26. unit_of_measurement: "hPa"
  27. - name: kmw_windspeed
  28. value_template: '{{ value_json["data"].windSpeed["value"] }}'
  29. unit_of_measurement: "m/s"
  30. - name: kmw_winddirection
  31. value_template: '{{ value_json["data"].windDirection["value"] }}'
  32. - name: kmw_windgust
  33. value_template: '{{ value_json["data"].windGust["value"] }}'
  34. unit_of_measurement: "m/s"
  35. - name: kmw_data_xsymbol
  36. value_template: '{{ value_json["data"].weatherSymbol["value"] }}'
  37. - name: kmw_cloudcoverage
  38. value_template: '{{ value_json["data"].cloudCoverage["value"] }}'
  39. unit_of_measurement: "%"
  40.  
  41. #Kachelmann Vorhesage
  42. - authentication: basic
  43. scan_interval: 10800
  44. resource_template: https://api.kachelmannwetter.com/v02/forecast/{{ state_attr('zone.home', 'latitude') | round(3) }}/{{ state_attr('zone.home', 'longitude') | round(3) }}/3day?units=metric
  45. headers:
  46. Accept: application/json
  47. X-API-Key: !secret Kachelmannwetter
  48. sensor:
  49. - name: kmw_data_0
  50. value_template: '{{ value_json.data[0].dateTime }}'
  51. - name: kmw_data_0name
  52. value_template: '{{ value_json.data[0].dayName }}'
  53. - name: kmw_data_0tempmax
  54. value_template: '{{ value_json.data[0].tempMax }}'
  55. unit_of_measurement: "°C"
  56. - name: kmw_data_0tempmin
  57. value_template: '{{ value_json.data[0].tempMin }}'
  58. unit_of_measurement: "°C"
  59. - name: kmw_data_0symbol
  60. value_template: '{{ value_json.data[0].weatherSymbol }}'
  61. - name: kmw_data_0prec
  62. value_template: '{{ value_json.data[0].precCurrent }}'
  63. unit_of_measurement: "mm"
  64. - name: kmw_data_1
  65. value_template: '{{ value_json.data[1].dateTime }}'
  66. - name: kmw_data_1name
  67. value_template: '{{ value_json.data[1].dayName }}'
  68. - name: kmw_data_1tempmax
  69. value_template: '{{ value_json.data[1].tempMax }}'
  70. unit_of_measurement: "°C"
  71. - name: kmw_data_1tempmin
  72. value_template: '{{ value_json.data[1].tempMin }}'
  73. unit_of_measurement: "°C"
  74. - name: kmw_data_1symbol
  75. value_template: '{{ value_json.data[1].weatherSymbol }}'
  76. - name: kmw_data_1prec
  77. value_template: '{{ value_json.data[1].precCurrent }}'
  78. unit_of_measurement: "mm"
  79. - name: kmw_data_2
  80. value_template: '{{ value_json.data[2].dateTime }}'
  81. - name: kmw_data_2name
  82. value_template: '{{ value_json.data[2].dayName }}'
  83. - name: kmw_data_2tempmax
  84. value_template: '{{ value_json.data[2].tempMax }}'
  85. unit_of_measurement: "°C"
  86. - name: kmw_data_2tempmin
  87. value_template: '{{ value_json.data[2].tempMin }}'
  88. unit_of_measurement: "°C"
  89. - name: kmw_data_2symbol
  90. value_template: '{{ value_json.data[2].weatherSymbol }}'
  91. - name: kmw_data_2prec
  92. value_template: '{{ value_json.data[2].precCurrent }}'
  93. unit_of_measurement: "mm"
  94.  
  95. #Kachelmann Vorhesage+
  96. - authentication: basic
  97. scan_interval: 10800
  98. resource_template: https://api.kachelmannwetter.com/v02/forecast/{{ state_attr('zone.home', 'latitude') | round(3) }}/{{ state_attr('zone.home', 'longitude') | round(3) }}/trend14days?units=metric
  99. headers:
  100. Accept: application/json
  101. X-API-Key: !secret Kachelmannwetter
  102. sensor:
  103. - name: kmw_data_3
  104. value_template: '{{ value_json.data[2].dateTime }}'
  105. - name: kmw_data_3tempmax
  106. value_template: '{{ value_json.data[2].tempMax }}'
  107. unit_of_measurement: "°C"
  108. - name: kmw_data_3tempmin
  109. value_template: '{{ value_json.data[2].tempMin }}'
  110. unit_of_measurement: "°C"
  111. - name: kmw_data_3prectype
  112. value_template: '{{ value_json.data[2].precType }}'
  113. - name: kmw_data_3cloudword
  114. value_template: '{{ value_json.data[2].cloudWord }}'
  115. - name: kmw_data_3prec
  116. value_template: '{{ value_json.data[2].prec }}'
  117. unit_of_measurement: "mm"
  118. - name: kmw_precprob1
  119. value_template: '{{ value_json.data[0].precProb1mm }}'
  120. unit_of_measurement: "%"
  121. - name: kmw_precprob2
  122. value_template: '{{ value_json.data[1].precProb1mm }}'
  123. unit_of_measurement: "%"
  124. - name: kmw_precprob3
  125. value_template: '{{ value_json.data[2].precProb1mm }}'
  126. unit_of_measurement: "%"
  127.  
  128.  
  129. Wahlweise
  130.  
  131. resource_template: https://api.kachelmannwetter.com/v02/forecast/{{ state_attr('zone.home', 'latitude') | round(3) }}/{{ state_attr('zone.home', 'longitude') | round(3) }}/trend14days?units=metric
  132.  
  133. oder
  134.  
  135. resource: https://api.kachelmannwetter.com/v02/forecast/XX.XXX/XX.XXX/trend14days?units=metric
  136.  
Advertisement
Add Comment
Please, Sign In to add comment