Rolllanden Steuerung

Hallo

Ich hab folgende Automation anhand von Simons Anleitung erstellt. Die Velux Rollos fahren auch hinunter seit ich den Forecast deaktiviert habe weil dieser bei mir leider nicht die Tageshöchsttemperatur angibt. Wenn hier wer noch eine Idee hat > sehr gerne.
Mein Problem ist aber das die Rollos nicht hochfahren! kann mir wer sagen warum?

Danke & lg

alias: Sun Protection WC & Büro
description: ""
trigger:
  - platform: time_pattern
    minutes: /15
    alias: Check alle 15 Minuten
  - platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 243
    alias: Sonne zu weit im Westen
    id: Sonne ok büro/bad
    value_template: ""
condition:
  - condition: or
    conditions:
      - condition: and
        conditions:
          - condition: numeric_state
            entity_id: sensor.sun_azimuth
            above: 66
            below: 244
          - condition: numeric_state
            entity_id: sun.sun
            attribute: elevation
            above: 5.5
          - condition: numeric_state
            entity_id: sensor.openweathermap_temperature
            above: 21
            enabled: false
          - condition: state
            entity_id: input_boolean.sun_prodection_buro_wc
            state: "on"
          - condition: template
            value_template: >-
              {{ not state_attr('automation.sun_protection_wc_buro',
              'last_triggered').day==now().day }}
            enabled: true
        alias: Bedingungen für Rollo muss runter
      - condition: and
        conditions:
          - condition: trigger
            id:
              - Sonne ok büro/bad
          - condition: template
            value_template: >-
              {{ state_attr('automation.sun_protection_wc_buro',
              'last_triggered').day==now().day }}
            enabled: false
        alias: Bedingung für Rollo soll wieder hoch
action:
  - if:
      - condition: template
        value_template: >-
          {{ not
          state_attr('automation.sun_protection_wc_buro','last_triggered').day==now().day
          }}
        enabled: false
    then:
      - service: scene.turn_on
        target:
          entity_id: scene.sun_prodection_buro_wc
        metadata: {}
    else:
      - service: scene.turn_on
        target:
          entity_id: scene.sun_prodection_buro_wc_hoch
        metadata: {}
    alias: Rollos runter
  - if:
      - condition: and
        conditions:
          - condition: trigger
            id:
              - Sonne ok
    then:
      - service: scene.turn_on
        target:
          entity_id: scene.sun_prodection_buro_wc_hoch
        metadata: {}
    alias: Rollos wieder hoch
mode: single

Was mir auffällt, ist, dass Deine Auslöser-ID für die letzte Aktion nur als Sonne ok bezeichnet ist, der Auslöser aber als Sonne ok büro/bad. Die beiden müssen übereinstimmen.

Hab ich geändert aber läuft trotzdem nicht. Die Rollos fahren einfach nicht hoch. Glaub das es am Azimuth liegt aber komme nicht weiter. Hat sonst noch wer eine Idee?

Schau Dir mal die Trace Timeline an, ob der Trigger ausgelöst hat. Die ID war aber definitiv falsch. Was hast Du denn da für einen sensor.sun_azimuth? Der Azimut ist doch ein Attribut von sun.sun. Das funktioniert auf jeden Fall:

platform: numeric_state
entity_id: sun.sun
attribute: azimuth
above: 243
alias: Sonne zu weit im Westen
id: Sonne ok büro/bad

Wenn Du spezielle Bedingungen für einzelne Wenn-dann-Aktionen hast, dann musst Du die außerdem direkt in deren Bedingungen auflisten.

Was ist denn eigentlich genau Dein Auslöser für Rollos zu?

Ich würde das mit einem Temperatur-Trigger aus einem der Räume aufbauen.

alias: Sun Protection WC & Büro
description: ""
trigger:
  - platform: numeric_state
    entity_id: sensor.buero_temperatur
	above: '26'
	id: sunprotect_on
  - platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: '243'
    alias: Sonne zu weit im Westen
    id: sunprotect_off
action:
  - choose:
    - conditions:
	  - condition: trigger
	    id: sunprotect_on
      - condition: state
        entity_id: sun.sun
        state: above_horizon
	  - condition: state
		entity_id: input_boolean.sun_prodection_buro_wc
		state: "on"
	  - condition: template
		value_template: >-
		  {{ not state_attr('automation.sun_protection_wc_buro',
		  'last_triggered').day==now().day }}
	  sequence:
	    - service: scene.turn_on
          target:
            entity_id: scene.sun_prodection_buro_wc
  - choose:
    - conditions:
	  - condition: trigger
	    id: sunprotect_off
	  - condition: template
		value_template: >-
		  {{ state_attr('automation.sun_protection_wc_buro',
		  'last_triggered').day==now().day }}
	  sequence:
	    - service: scene.turn_on
          target:
            entity_id: scene.sun_prodection_buro_wc_hoch
mode: single

Und wie Heiko schrieb, einen Azimuth Sensor gibt es standardmäßig nicht. Das ist ein Attribut in sun.sun.

Ersmal danke. Das mit der Temperatur funktioninert leider nicht weil es dann schon zu spät wäre für den Sonnenschutz. Wollte eigentlich wie Simon es beschrieben hat noch mit der Tageshöchsttemperatur arbeiten aber das geht leider nicht.
Hab mir jetzt einen Schalter im Dashboard gemacht mit dem ich es dann steuern kann. Mein Problem ist ja nur das die Rollos nicht hoch gehen. Runter funktioniert es ja.
Den Azimuth Sensor hab ich mir angelegt.

  - platform: template
    sensors:
      sun_azimuth:
        friendly_name: "Sonnenwinkel"
        unit_of_measurement: 'degrees'
        value_template: "{{ state_attr('sun.sun', 'azimuth') }}"

Hast Du denn Deine Bedingungen jetzt in die jeweilige Wenn-dann-Aktion eingefügt? So, wie es oben steht, gelten alle allgemeinen Bedingungen der Automation auch für Rollos hoch. Das kannst Du dort nicht aufteilen.

Warum hast Du denn den Sensor gebaut? Das ist in so einem Fall eigentlich nur nötig, wenn die Integration einen Wert nicht freiwillig bereitstellt.