# Besoin d'aide pour faire un blueprint de gestion de volet roulant

**URL:** <https://forum.hacf.fr/t/besoin-daide-pour-faire-un-blueprint-de-gestion-de-volet-roulant/11294>\
**Category:** Automatisation / Scène / Script / BluePrint\
**Created:** [Mai 18, 2022, 6:34 UTC](https://forum.hacf.fr/t/besoin-daide-pour-faire-un-blueprint-de-gestion-de-volet-roulant/11294 "2022-05-18T06:34:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tet](https://forum.hacf.fr/user_avatar/forum.hacf.fr/tet/32/4799_2.png) [@tet](https://forum.hacf.fr/u/tet)\
**Post date:** [Mai 18, 2022, 6:34 UTC](https://forum.hacf.fr/t/besoin-daide-pour-faire-un-blueprint-de-gestion-de-volet-roulant/11294/1 "2022-05-18T06:34:16Z")

</div>

Bonjour,

Je souhaites faire un blueprint pour la gestion de mes volets roulants.  
Actuellement j'ai une automation comme décrite dans ce tuto:  
[https://forum.hacf.fr/t/automatiser-ses-volets-roulants-en-fonction-du-soleil-ete-hiver/1061](https://forum.hacf.fr/t/automatiser-ses-volets-roulants-en-fonction-du-soleil-ete-hiver/1061)

Ca fonctionne mais j'aimerai essayé de faire ça en blueprint pour l'appliqué à tout mes VR.  
Le soucis c'est que je suis pas trop à la page niveau codage.

J'ai fais un petit logigramme:

 ![logiVR](https://forum.hacf.fr/uploads/default/original/2X/3/3393dc974a8357b2b91cb5fd33eef3da6a7f08f6.png)

Coté blueprint j'ai commancé les déclarations:

```auto
blueprint:
  name: VR Auto
  description: commande VR automatique
  domain: automation
  input:
    VR_cover:
      name: VR cover
      description: VR à piloter.
      selector:
        entity:
          domain: cover
    VR_cover_state:
      name: VR cover state
      description: Position cover.
      selector:
        entity:
          domain: cover
    Windows_state:
      name: Windows state
      description: State of windows (open/close).
      selector:
        entity:
          domain: binary_sensor
          device_class: window
    mode_jn:
      name: Mode Jour Nuit
      description: Mode Jour Nuit.
      selector:
        entity:
          domain: input_select
    sun_vr:
      name: Sun VR
      description: Windows is on sun.
      selector:
        entity:
          domain: binary_sensor
          device_class: light

```

Par contre pour le codage je ne sais pas par où commencer pour apprendre?  
Sinon si un âme charitable est prête à m'écrire le code 😁 je ne dit pas non.  
Et j'arriverai bien à apporter quelque modification si besoin

Sinon le yaml de mon automation si ca peu servir:

```auto
alias: Auto VR Chambre Parentale
description: ''
trigger:
  - platform: state
    entity_id:
      - input_select.mode_jn
  - platform: state
    entity_id:
      - binary_sensor.soleil_vr_chambre_rdc
      - binary_sensor.fenetre_chambre_parents_contact
condition:
  - condition: numeric_state
    entity_id: cover.flush_shutter
    attribute: current_position
    above: '1'
action:
  - if:
      - condition: state
        entity_id: input_select.mode_jn
        state: Nuit
    then:
      - if:
          - condition: or
            conditions:
              - condition: state
                entity_id: person.etienne
                state: home
              - condition: state
                entity_id: person.mathilde
                state: home
        then:
          - if:
              - condition: state
                entity_id: binary_sensor.fenetre_chambre_parents_contact
                state: 'off'
            then:
              - service: cover.close_cover
                data: {}
                target:
                  device_id: fd5c08843628f881829dba296d9144c1
              - wait_for_trigger: []
                timeout: '120'
              - service: cover.close_cover
                data: {}
                target:
                  device_id: fd5c08843628f881829dba296d9144c1
            else:
              - service: cover.open_cover
                data: {}
                target:
                  device_id: fd5c08843628f881829dba296d9144c1
        else:
          - service: cover.close_cover
            data: {}
            target:
              device_id:
                - fd5c08843628f881829dba296d9144c1
    else:
      - condition: state
        entity_id: input_select.mode_jn
        state: Jour
      - if:
          - condition: state
            entity_id: binary_sensor.fenetre_chambre_parents_contact
            state: 'on'
        then:
          - if:
              - condition: or
                conditions:
                  - condition: state
                    entity_id: person.etienne
                    state: home
                  - condition: state
                    entity_id: person.mathilde
                    state: home
            then:
              - service: cover.open_cover
                data: {}
                target:
                  device_id: fd5c08843628f881829dba296d9144c1
            else:
              - service: cover.close_cover
                data: {}
                target:
                  device_id: fd5c08843628f881829dba296d9144c1
        else:
          - if:
              - condition: state
                entity_id: input_select.mode_thermostat
                state: Ete
            then:
              - if:
                  - condition: state
                    entity_id: binary_sensor.soleil_vr_chambre_rdc
                    state: 'on'
                then:
                  - service: cover.set_cover_position
                    data:
                      position: 20
                    target:
                      device_id: fd5c08843628f881829dba296d9144c1
                else:
                  - service: cover.open_cover
                    data: {}
                    target:
                      device_id: fd5c08843628f881829dba296d9144c1
            else:
              - service: cover.open_cover
                data: {}
                target:
                  device_id: fd5c08843628f881829dba296d9144c1
mode: single

```

Merci 🙏
