Advertisement
Hoekeren75

Dynamiske lamelgardiner

May 11th, 2025
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.80 KB | None | 0 0
  1. alias: Dynamisk lamelgardin
  2. description: ""
  3. triggers:
  4.   - entity_id: sun.sun
  5.     attribute: azimuth
  6.     trigger: state
  7.     id: Azimuth
  8.   - trigger: numeric_state
  9.     entity_id:
  10.      - sun.sun
  11.     below: 15
  12.     id: Elevation
  13.     attribute: elevation
  14. conditions: []
  15. actions:
  16.   - choose:
  17.       - conditions:
  18.           - condition: trigger
  19.             id:
  20.              - Azimuth
  21.           - condition: numeric_state
  22.             entity_id: sun.sun
  23.             attribute: azimuth
  24.             above: 190
  25.             below: 270
  26.           - condition: numeric_state
  27.             entity_id: sun.sun
  28.             attribute: elevation
  29.             above: 16
  30.           - condition: numeric_state
  31.             entity_id: sensor.klimasensor_tvstuen_temperature
  32.             above: 22
  33.           - condition: or
  34.             conditions:
  35.               - condition: state
  36.                 entity_id: weather.forecast_home
  37.                 state: sunny
  38.               - condition: state
  39.                 entity_id: weather.forecast_home
  40.                 state: partlycloudy
  41.         sequence:
  42.           - data:
  43.               entity_id: cover.lamelgardiner_stuevinduer
  44.               position: |
  45.                {{ (100-((state_attr('sun.sun','azimuth')|float - 190)
  46.                     * (100 / (270 - 190))))|round(0) }}
  47.             action: cover.set_cover_position
  48.       - conditions:
  49.           - condition: trigger
  50.             id:
  51.              - Elevation
  52.         sequence:
  53.           - action: cover.open_cover
  54.             metadata: {}
  55.             data: {}
  56.             target:
  57.               entity_id: cover.lamelgardiner_stuevinduer
  58.   - data:
  59.       message: Lamelgardiner justeret efter solens position
  60.       title: Home Assistant
  61.     action: notify.mobile_app_cs_mobil
  62.     enabled: false
  63. mode: single
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement