nitschkecm
Dec 31st, 2024
14
0
Never
This is comment for paste Rolladen unter 10 nach Sonnenuntergang
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Hallo Udo,
  2.  
  3. ich habe folgendes bei mir Eingestellt mal sehen ob es funktioniert.
  4.  
  5.  
  6. alias: New automation
  7. description: ""
  8. triggers:
  9. - trigger: numeric_state
  10. entity_id:
  11. - weather.forecast_home
  12. below: 10
  13. conditions:
  14. - condition: sun
  15. after: sunset
  16. after_offset: "30"
  17. actions:
  18. - action: cover.close_cover
  19. metadata: {}
  20. data: {}
  21. target:
  22. entity_id:
  23. - cover.despacho
  24. mode: single
  25.  
  26. Ich habe für Forecast den folgenden Code gefunden:
  27. # Day min and max temp
  28. - platform: template
  29. sensors:
  30. day_max_temp:
  31. friendly_name: "24 Std. Höchsttemperatur"
  32. unit_of_measurement: "°C"
  33. entity_id: weather.openweathermap
  34. value_template: >
  35. {#% set start = (now().replace(hour=0,minute=0,second=0).timestamp() * 1000) | int %#}
  36. {% set start = (now().timestamp() * 1000) | int %}
  37. {% set end = start + 86400000 %}
  38. {{ state_attr('weather.openweathermap', 'forecast') | selectattr('datetime', '>=', start) | selectattr('datetime','<=', end) | map(attribute='temperature') | list | max }}
  39.  
  40. day_min_temp:
  41. friendly_name: "24 Std. Tiefsttemperatur"
  42. unit_of_measurement: "°C"
  43. entity_id: weather.openweathermap
  44. value_template: >
  45. {#% set start = (now().replace(hour=0,minute=0,second=0).timestamp() * 1000) | int %#}
  46. {% set start = (now().timestamp() * 1000) | int %}
  47. {% set end = start + 86400000 %}
  48. {{ state_attr('weather.openweathermap', 'forecast') | selectattr('datetime', '>=', start) | selectattr('datetime','<=', end) | map(attribute='temperature') | list | min }}
  49.  
  50. Wenn ich das bei mir Anlegen will bekomme ich "No aggregated item, sequence was empty" Wenn Du da einen guten Tip hast..
  51. Ich habe Open Weathermap installiert und kongiguriert.
  52.  
  53. Vielen Dank und ein Frohes neues!
  54.  
Advertisement
Add Comment
Please, Sign In to add comment