How to set global configuration or variables?

This is working for me:

  - sensor:
      - name: "storen_data"
        state: "active"
        attributes:
          data: |
            {{ {"gaestebad": {
              "entity_id": "cover.storen_1_cec9_storen_1_gaestebad",
              "azimuth_min": 135,
              "azimuth_max": 225,
              "position_default": 100,
              "tilt_default": 100,
              "position_vor_abends": 0,
              "tilt_vor_abends": 30,
              "position_abends": 0,
              "tilt_abends": 0,
              "position_nacht": 0,  
              "tilt_nacht": 0,
              "position_sonnenschutz": 0,
              "tilt_sonnenschutz": 40,
              "window_sensor": "sensor.custom_fenster_status_gaestebad",
              "automation_active_sensor": "input_boolean.storen_automatic_gaestebad_fenster"} } }}

Then:

{{state_attr('sensor.storen_data', 'data').gaestebad.azimuth_min}}