[CARD] Imprimante 3D , nouvelle version

Bj

Nouvelle version
Precedement j’avais fait ceci

Mais il s’avere que malgre la création des sensors cela ne fonctionné pas

  • Reamaining
  • Elapsed

j’ai trouvé le même sur
Home Assistant Community Store une version corrigé du souci
donc installé celle ci qui coorige le probleme.

Une fois cela fait , installer egalement

Créé les interrupteurs suivants dans Home Assistant:

  • input_boolean.octo_controls
  • input_boolean.octo_info
  • input_boolean.octoprint_webcam

Les requis obligatoire a installé sur votre Raspberry ou autres

Sur Home Assistant ( HACS )

Home Assistant

square: false
columns: 1
type: grid
cards:
  - type: horizontal-stack
    cards:
      - type: custom:threedy-card
        base_entity: sensor.octoprint_mqtt
        monitored:
          - Status
          - Bed
          - Hotend
          - ETA
          - Elapsed
          - Remaining
        sensors:
          Progress:
            entity: sensor.octoprint_mqtt_print_progress
          Elapsed:
            entity: sensor.octoprint_mqtt_print_progress
            attribute: printTime
          Remaining:
            entity: sensor.octoprint_mqtt_print_progress
            attribute: printTimeLeft
            name: Rem
          ETA:
            entity: sensor.octoprint_mqtt_print_progress
            attribute: printTimeLeft
        Status:
          entity: sensor.octoprint_mqtt_print_status
        Hotend:
          entity: sensor.octoprint_mqtt_tool_0_temperature
        Bed:
          entity: sensor.octoprint_mqtt_bed_temperature
        printer_type: I3
        name: Ender 3
        theme: Default
        temperature_unit: C
        round_temperature: true
        use_mqtt: true
        use_24hr: true
        camera_entity: camera.ender_3_neo_camera
        power_entity: switch.235_imprimante_ender_3d_outlet
        light_entity: light.spot_led_salon
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-entity-card
        entity: input_boolean.octo_controls
        tap_action:
          action: toggle
        icon_color: indigo
        name: Control
        secondary_info: none
      - type: horizontal-stack
        cards:
          - type: custom:mushroom-entity-card
            entity: input_boolean.octoprint_webcam
            name: Webcam
            tap_action:
              action: toggle
            secondary_info: none
      - type: custom:mushroom-entity-card
        entity: input_boolean.octo_info
        name: Info
        tap_action:
          action: toggle
        secondary_info: none
  - type: conditional
    conditions:
      - entity: input_boolean.octo_controls
        state: 'on'
    card:
      type: custom:mushroom-title-card
      title: Axis Controls
  - type: conditional
    conditions:
      - entity: input_boolean.octo_controls
        state: 'on'
    card:
      type: horizontal-stack
      cards:
        - type: horizontal-stack
          cards:
            - type: custom:mushroom-entity-card
              entity: input_boolean.octo_controls
              tap_action:
                action: call-service
                service: mqtt.publish
                target: {}
                data:
                  topic: octoPrint/hassControl/home
                  payload: '["x", "y", "z"]'
                  qos: 0
                  retain: false
              primary_info: none
              icon_color: green
              fill_container: false
              icon: mdi:home
              secondary_info: none
              layout: horizontal
            - type: custom:mushroom-entity-card
              entity: input_boolean.octo_controls
              icon: mdi:arrow-up-bold
              tap_action:
                action: call-service
                service: mqtt.publish
                target: {}
                data:
                  topic: octoPrint/hassControl/jog
                  payload: '{"z": 10, "speed": 0.5}'
                  qos: 0
                  retain: false
              primary_info: none
              icon_color: orange
              fill_container: false
              secondary_info: none
              layout: horizontal
            - type: custom:mushroom-entity-card
              entity: input_boolean.octo_controls
              icon: mdi:arrow-down-bold
              tap_action:
                action: call-service
                service: mqtt.publish
                target: {}
                data:
                  topic: octoPrint/hassControl/jog
                  payload: '{"z": -10, "speed": 0.5}'
                  qos: 0
                  retain: false
              primary_info: none
              icon_color: orange
              fill_container: false
              secondary_info: none
              layout: horizontal
            - type: custom:mushroom-entity-card
              entity: input_boolean.octo_controls
              icon: mdi:arrow-left-bold
              tap_action:
                action: call-service
                service: mqtt.publish
                target: {}
                data:
                  topic: octoPrint/hassControl/jog
                  payload: '{"x": -10, "speed": 0.5}'
                  qos: 0
                  retain: false
              primary_info: none
              icon_color: orange
              fill_container: false
              secondary_info: none
              layout: horizontal
            - type: custom:mushroom-entity-card
              entity: input_boolean.octo_controls
              icon: mdi:arrow-right-bold
              tap_action:
                action: call-service
                service: mqtt.publish
                target: {}
                data:
                  topic: octoPrint/hassControl/jog
                  payload: '{"x": 10, "speed": 0.5}'
                  qos: 0
                  retain: false
              primary_info: none
              icon_color: orange
              fill_container: false
              secondary_info: none
              layout: horizontal
  - type: conditional
    conditions:
      - entity: input_boolean.octo_controls
        state: 'on'
    card:
      type: custom:mushroom-title-card
      title: Power Controls
  - type: conditional
    conditions:
      - entity: input_boolean.octo_controls
        state: 'on'
    card:
      type: horizontal-stack
      cards:
        - type: custom:stack-in-card
          cards:
            - type: custom:layout-card
              layout_type: custom:grid-layout
              layout:
                grid-template-columns: auto 63px
                margin: '-4px -4px -8px -4px'
              cards:
                - type: custom:stack-in-card
                  mode: horizontal
                  keep:
                    background: true
                    border_radius: true
                    margin: true
                  cards:
                    - type: custom:mushroom-template-card
                      primary: ''
                      secondary: Ender 3 Switch
                      icon: mdi:fan
                      tap_action:
                        action: toggle
                      layout: vertical
                      entity: switch.235_imprimante_ender_3d_outlet
                      icon_color: |-
                        {% if is_state(entity, 'on') %}
                          green
                        {% endif %}
                        {% if is_state(entity, 'off') %}
                          white
                        {% endif %}
                      double_tap_action:
                        action: toggle
                    - type: custom:mushroom-template-card
                      entity: button.octoprint_mqtt_restart_server
                      secondary: Restart Octo
                      icon: mdi:restart-alert
                      icon_color: orange
                      layout: vertical
                      tap_action:
                        action: toggle
                    - type: custom:mushroom-template-card
                      entity: button.ender_3_neo_resume_job
                      secondary: Resume
                      icon: mdi:play
                      icon_color: green
                      layout: vertical
                      tap_action:
                        action: toggle
  - type: conditional
    conditions:
      - entity: input_boolean.octo_controls
        state: 'on'
    card:
      type: horizontal-stack
      cards:
        - type: custom:stack-in-card
          cards:
            - type: custom:layout-card
              layout_type: custom:grid-layout
              layout:
                grid-template-columns: auto 63px
                margin: '-4px -4px -8px -4px'
              cards:
                - type: custom:stack-in-card
                  mode: horizontal
                  keep:
                    background: true
                    border_radius: true
                    margin: true
                  cards:
                    - type: custom:mushroom-template-card
                      entity: switch.octoprint_mqtt_pause_print
                      secondary: Pause
                      icon: mdi:pause
                      icon_color: yellow
                      layout: vertical
                      tap_action:
                        action: toggle
                    - type: custom:mushroom-template-card
                      entity: button.ender_3_neo_stop_job
                      secondary: Stop
                      icon: mdi:stop
                      icon_color: red
                      layout: vertical
                      tap_action:
                        action: toggle
                    - type: custom:mushroom-template-card
                      entity: button.octoprint_mqtt_cancel_print
                      icon: mdi:cancel
                      secondary: Cancel
                      icon_color: red
                      layout: vertical
                      tap_action:
                        action: toggle
  - type: conditional
    conditions:
      - entity: input_boolean.octoprint_webcam
        state: 'on'
    card:
      camera_view: auto
      type: picture-glance
      title: Ender 3 S1
      image: http://10.10.0.180/webcam/?action=stream
      entities: []
      tap_action:
        action: toggle
      hold_action:
        action: toggle
  - type: conditional
    conditions:
      - entity: input_boolean.octo_info
        state: 'on'
    card:
      type: vertical-stack
      cards:
        - type: horizontal-stack
          cards:
            - type: custom:mushroom-entity-card
              entity: sensor.octoprint_mqtt_print_progress
              icon: mdi:printer-3d
              icon_color: lime
              name: Progress
            - type: custom:mushroom-entity-card
              entity: sensor.octoprint_mqtt_print_time_left
              name: ETA
              icon: mdi:home-clock
              icon_color: lime
        - type: horizontal-stack
          cards:
            - type: custom:mushroom-entity-card
              entity: switch.octoprint_mqtt_connect_to_printer
              tap_action:
                action: toggle
              icon_color: teal
              name: Connect to Octo
            - type: custom:mushroom-entity-card
              entity: binary_sensor.octoprint_mqtt_connected
              name: Octo Connection
              icon: mdi:check-network
              icon_color: teal
  - type: conditional
    conditions:
      - entity: input_boolean.octo_info
        state: 'on'
    card:
      show_state: true
      show_name: false
      camera_view: auto
      type: picture-entity
      entity: sensor.octoprint_mqtt_print_file
      camera_image: camera.ultimaker_format_package
      tap_action:
        action: toggle

Il y’a une petite particularité pour faire cette carte
Capture d'écran 2024-01-14 182142

Pour cela vous aller avoir besoin de
Generic Camera de Home Assistant

Une fois installé recupéré le lien ( changé votre IP au debut ) c’est celui de votre OCTOPRINT
http://10.10.0.180/plugin/prusaslicerthumbnails/thumbnail/{{states('sensor.octoprint_mqtt_print_file').split('.')[0]}}.png

Ouvré Generic Camera , et mettre votre lien dedans


Et validé , cela va vous cree une entité camera qui se trouve en vas de la carte.
Comme ceci:
camera_image: camera.ultimaker_format_package



BONUS:

Notifications:

service: notify.notify
data:
  title: Printing {{ states("sensor.octoprint_mqtt_print_file") }}
  message: >-
    Your print has {{ timedelta(seconds=states("sensor.octoprint_mqtt_print_time_left")|int(default=0)) }} left,
    after {{ timedelta(seconds=states("sensor.octoprint_mqtt_print_time")|int(default=0)) }}.
    Current Z{{ states("sensor.octoprint_mqtt_current_z") }}
  data:
    notification_icon: mdi:printer-3d

AUTOMATISATIONS ET SCRIPTS

Automatisation:

alias: "PRINTER - Ender 3 - Arrêt lorsque l'imprimante est froide"
description: Arrêter l'imprimante une fois qu'elle a refroidi.
trigger:
  - below: "40.0"
    entity_id:
      - sensor.octoprint_mqtt_tool_0_temperature
    for:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
    platform: numeric_state
condition:
  - condition: not
    conditions:
      - condition: state
        entity_id: binary_sensor.octoprint_mqtt_printing
        state: "On"
action:
  - service: script.ender_3_safe_shutdown
    data: {}
  - data: {}
    service: automation.turn_off
    target:
      entity_id:
        - automation.printer_ender_3_shutdown_when_cool

Et le script qui va avec l’automatisation ci dessus:

alias: Arrêt sécurisé d'Ender 3
sequence:
  - type: turn_on
    device_id: c8b6eceddbfcd69f984d0459f21a7290
    entity_id: f051e87af054ee24fea508732601a342
    domain: switch
  - wait_template: "{{ is_state('sensor.octoprint_mqtt_print_status', 'unavailable') }}"
  - delay: "00:02:00"
  - type: turn_off
    device_id: c8b6eceddbfcd69f984d0459f21a7290
    entity_id: f051e87af054ee24fea508732601a342
    domain: switch
mode: single
2 « J'aime »

Impeccable, je n’ai plus qu’à attendre la fin de l’impression pour installer les modules complémentaires sur octoprint, le reste fonctionne nikel. Merci pour le boulot,
Et en plus si on peut visualiser le gcode, que demande le peuple.

Edit : il ne reste plus qu’un petit souci :

avec cette adresse et le capteur qu’il faut :

http://192.168.0.2/plugin/prusaslicerthumbnails/thumbnail/{{states('sensor.octoprint_print_file').split('.')[0]}}.png

Si je lance dans la barre d’adresse : 404: Not Found

Ca doit venir d’octoprint car je ne vois pas la vignette thumbnail dans la liste des fichiers.

Capture d'écran 2024-01-14 213954

La suite à la fin de la nouvelle impression.

il me semble qu’une impression doit etre lance pour que cela s’affiche , je regarde ca de suite.

EDIT:
@Ludoc , ton slicer c’est quoi ?

Ultimaker Cura
Capture d'écran 2024-01-14 222525

ok , il me semble que j’ai du crée ceci




1 « J'aime »

Merci pour l’explication, ça fonctionne avec les scripts :

Je verrai à la prochaine impression pour voir si c’est pris en compte :wink:
Merci.

1 « J'aime »

Hello,
Ca fonctionne :

Merci :wink:

1 « J'aime »

Salut,
excuse-moi de mon indiscrétion, mais c’est quoi c’est objet ? :rofl:

@WarC0zes , un objet pour netatmo d’apres le nom de son gcode

Edit: ,

tu parle des pico ??
si cela c’est pour faire des test de retration du filament est reglé les defauts.

Apres si tu veux tu l’ai pose au sol dans la maison , et la nuit du marche dessus , cela reveille direct :rofl: :rofl:

Salut, c’est pour poser le relais wifi de la chaudière sur un mur


.
(oups, ça tombe, la question n’était pas pour moi).

2 « J'aime »

Oui, les pico. Je pensais que c’était pour mettre sur une chaise :sweat_smile: :rofl:

mais pas bête !! vais gardé cela en mémoire :grin:

Hello, Pour la carte threedy, j’ai plutôt utilisé le fork => https://github.com/xZetsubou/ha-threedy-card?tab=readme-ov-file#method-1–hacs qui permet d’utiliser d’autres entitées pour la carte threedy, sinon je n’avais pas toutes les valeurs de temps de dispo comme Remaining et ETA (exemple Moonraker)

1 « J'aime »

@Ludoc , hier ,j’ai remarque aussi le souci
je pensé que cela venais de moi , mais non

et j’ai également trouvé le git que tu dis , et ca va beaucoup mieux.
la je teste celle ci , et si ok je change dans le post le lien du git

Merci @Nothing :+1: pour ce tuto !
Merci @Ludoc :+1: car il faut bien installer :
https://github.com/xZetsubou/ha-threedy-card?tab=readme-ov-file#method-1–hacs
Pour pouvoir modifier les paramètres de Threedy :wink:

Je vous partage ma carte pour ma ENDER 3 V3 SE qui s’en inspire très largement.

Impression en cours :

En attente impression :

J’ai intégré mon RPI4 sous l’écran de mon imprimante en utilisant le modèle :

Ci-dessous le code de la carte :

type: custom:vertical-stack-in-card
cards:
  - type: custom:threedy-card
    base_entity: sensor.octoprint
    monitored:
      - Status
      - Bed
      - Hotend
      - ETA
      - Elapsed
      - Remaining
    sensors:
      Progress:
        entity: sensor.octoprint_job_percentage
      Elapsed:
        entity: sensor.octoprint_print_progress
        attribute: printTime
        name: Depuis
      Remaining:
        entity: sensor.octoprint_print_progress
        attribute: printTimeLeft
        name: Fin  dans
      ETA:
        entity: sensor.octoprint_print_progress
        attribute: printTimeLeft
        name: Fin à
    printer_type: I3
    name: MARCELLINE
    theme: Default
    temperature_unit: C
    round_temperature: true
    use_mqtt: true
    use_24hr: true
    camera_entity: camera.octoprint_camera
    power_entity: input_boolean.octopi_marceline_on_off
    light_entity: light.lampadaire
    scale: 0.75
  - type: conditional
    conditions:
      - condition: state
        entity: switch.octoprint_connect_to_printer
        state: 'on'
    card:
      show_state: false
      show_name: true
      camera_view: live
      type: picture-entity
      entity: camera.octoprint_camera
      camera_image: camera.octoprint_camera
      name: Caméra Octoprint
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-template-card
        primary: Puissance
        secondary: '{{ states(''sensor.power_153'')}} W'
        icon: mdi:lightning-bolt
        icon_color: ''
        tap_action:
          action: more-info
        hold_action:
          action: none
        double_tap_action:
          action: none
        entity: sensor.power_153
        fill_container: true
        layout: horizontal
        badge_icon: |-
          {% set temp = states('sensor.power_153') | float %}
          {% if temp < 100 %} 
          mdi:check
          {% else %}
          mdi:alert
          {% endif %}
        badge_color: ''
        card_mod:
          style:
            mushroom-state-info$: |
              .container {
                  {% set temp = states('sensor.power_153') | float %}
                  {% if temp < 100 %} 
                  --primary-text-color:;
                  --secondary-text-color: #0080FF;
                  {% else %}
                  --primary-text-color: tomato;
                  --secondary-text-color: tomato;
                  {% endif %}
                  
              }
            mushroom-badge-icon$: |
              .badge {
               {% set temp = states('ssensor.power_153') | float %}
               {% if temp > 100 %} 
               animation: ping2 2s infinite;
               {% endif %}
              }
              @keyframes ping2 {
                          0% {box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);}
                          70% {box-shadow: 0 0 0 10px transparent;}
                          100% {box-shadow: 0 0 0 0 transparent;}
                          }        
            mushroom-shape-icon$: |
              .shape {
                  {% set temp = states('sensor.power_153') | float %}
                  {% if temp < 100 %} 
                  --shape-animation: ping 5s infinite;
                  color: green !important;
                  --shape-color: none;
                  --shape-color-disabled: transparent !important;
                  --icon-symbol-size: 0.8em;
                  --icon-color: #0080FF
                  {% else %}
                  --shape-animation: ping2 5s infinite;
                  color: tomato !important;
                  --shape-color: none;
                  --shape-color-disabled: transparent !important;
                  --icon-symbol-size: 0.8em;
                  --icon-color: tomato
                  {% endif %}
              }
              @keyframes ping {
                    0% {box-shadow: 0 0 0 0 rgba(var(--rgb-blue), 0.7);}
                    70% {box-shadow: 0 0 0 15px transparent;}
                    100% {box-shadow: 0 0 0 0 transparent;}
              }
              @keyframes ping2 {
                    0% {box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);}
                    70% {box-shadow: 0 0 0 15px transparent;}
                    100% {box-shadow: 0 0 0 0 transparent;}
              }
            .: |
              mushroom-badge-icon {
                {% set temp = states('sensor.power_153') | float %}
                {% if temp > 100 %}
                animation: wobbling 0.7s linear infinite alternate;     
                --main-color: tomato !important;
                {% else %}
                --main-color: green !important;
                {% endif %}
              }
              @keyframes wobbling {
                0% {transform: rotate(-80deg);}
                100% {transform: rotate(40deg);}    
      - type: conditional
        conditions:
          - entity: input_boolean.octopi_marceline_on_off
            state: 'on'
          - entity: switch.octoprint_connect_to_printer
            state: 'on'
        card:
          type: custom:mushroom-template-card
          primary: RPI4
          secondary: '{{ states(''sensor.octoprint_soc_temperature'')}} °C'
          icon: mdi:raspberry-pi
          icon_color: ''
          tap_action:
            action: more-info
          hold_action:
            action: none
          double_tap_action:
            action: none
          entity: sensor.octoprint_soc_temperature
          fill_container: true
          layout: horizontal
          badge_icon: |-
            {% set temp = states('sensor.octoprint_soc_temperature') | float %}
            {% if temp < 50 %} 
            mdi:check
            {% else %}
            mdi:alert
            {% endif %}
          badge_color: ''
          card_mod:
            style:
              mushroom-state-info$: |
                .container {
                    {% set temp = states('sensor.octoprint_soc_temperature') | float %}
                    {% if temp < 50 %} 
                    --primary-text-color:;
                    --secondary-text-color: #0080FF;
                    {% else %}
                    --primary-text-color: tomato;
                    --secondary-text-color: tomato;
                    {% endif %}
                    
                }
              mushroom-badge-icon$: |
                .badge {
                 {% set temp = states('sensor.octoprint_soc_temperature') | float %}
                 {% if temp > 50 %} 
                 animation: ping2 2s infinite;
                 {% endif %}
                }
                @keyframes ping2 {
                            0% {box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);}
                            70% {box-shadow: 0 0 0 10px transparent;}
                            100% {box-shadow: 0 0 0 0 transparent;}
                            }        
              mushroom-shape-icon$: |
                .shape {
                    {% set temp = states('sensor.octoprint_soc_temperature') | float %}
                    {% if temp < 50 %} 
                    --shape-animation: ping 5s infinite;
                    color: green !important;
                    --shape-color: none;
                    --shape-color-disabled: transparent !important;
                    --icon-symbol-size: 0.8em;
                    --icon-color: #0080FF
                    {% else %}
                    --shape-animation: ping2 5s infinite;
                    color: tomato !important;
                    --shape-color: none;
                    --shape-color-disabled: transparent !important;
                    --icon-symbol-size: 0.8em;
                    --icon-color: tomato
                    {% endif %}
                }
                @keyframes ping {
                      0% {box-shadow: 0 0 0 0 rgba(var(--rgb-blue), 0.7);}
                      70% {box-shadow: 0 0 0 15px transparent;}
                      100% {box-shadow: 0 0 0 0 transparent;}
                }
                @keyframes ping2 {
                      0% {box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);}
                      70% {box-shadow: 0 0 0 15px transparent;}
                      100% {box-shadow: 0 0 0 0 transparent;}
                }
              .: |
                mushroom-badge-icon {
                  {% set temp = states('sensor.octoprint_soc_temperature') | float %}
                  {% if temp > 50 %}
                  animation: wobbling 0.7s linear infinite alternate;     
                  --main-color: tomato !important;
                  {% else %}
                  --main-color: green !important;
                  {% endif %}
                }
                @keyframes wobbling {
                  0% {transform: rotate(-80deg);}
                  100% {transform: rotate(40deg);}
      - type: conditional
        conditions:
          - entity: binary_sensor.octoprint_printing
            state: o
          - entity: input_boolean.octopi_marceline_on_off
            state: 'on'
        card:
          type: custom:mushroom-template-card
          primary: Arrêt d'urgence
          secondary: Appui long
          icon: mdi:alert-octagon
          icon_color: null
          tap_action:
            action: more-info
          hold_action:
            action: call-service
            service: input_button.press
            target: {}
          double_tap_action:
            action: none
          entity: button.octoprint_emergency_stop
          fill_container: true
          layout: horizontal
          badge_icon: mdi:printer-3d
          badge_color: ''
          card_mod:
            style:
              mushroom-state-info$: |
                .container {
                    --primary-text-color: red;
                    --secondary-text-color: red;   
                }
              mushroom-badge-icon$: |
                .badge {
                 animation: ping2 1s infinite;
                }
                @keyframes ping2 {
                            0% {box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);}
                            70% {box-shadow: 0 0 0 10px transparent;}
                            100% {box-shadow: 0 0 0 0 transparent;}
                            }        
              mushroom-shape-icon$: |
                .shape {
                    --shape-animation: ping2 1s infinite;
                    color: red !important;
                    --shape-color: none;
                    --shape-color-disabled: transparent !important;
                    --icon-symbol-size: 0.8em;
                    --icon-color: red
                    
                }
                @keyframes ping {
                      0% {box-shadow: 0 0 0 0 rgba(var(--rgb-blue), 0.7);}
                      70% {box-shadow: 0 0 0 15px transparent;}
                      100% {box-shadow: 0 0 0 0 transparent;}
                }
                @keyframes ping2 {
                      0% {box-shadow: 0 0 0 0 rgba(var(--rgb-red), 0.7);}
                      70% {box-shadow: 0 0 0 15px transparent;}
                      100% {box-shadow: 0 0 0 0 transparent;}
                }
              .: |
                mushroom-badge-icon {
                  --main-color: red !important;
  - type: conditional
    conditions:
      - entity: binary_sensor.octoprint_printing
        state_not: 'on'
      - entity: input_boolean.octopi_marceline_on_off
        state: 'on'
    card:
      type: horizontal-stack
      cards:
        - type: vertical-stack
          title: Pilotage Otopi & Raspberry pi 4
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:stack-in-card
                  mode: horizontal
                  keep:
                    background: true
                    border_radius: true
                    margin: true
                  cards:
                    - type: custom:mushroom-entity-card
                      entity: switch.octoprint_connect_to_printer
                      tap_action:
                        action: toggle
                      icon_color: teal
                      layout: vertical
                      name: Octopi
                    - type: custom:mushroom-template-card
                      entity: button.octoprint_reboot_system
                      secondary: Octopi
                      icon: mdi:restart-alert
                      icon_color: yellow
                      layout: vertical
                      tap_action:
                        action: toggle
                    - type: custom:mushroom-template-card
                      entity: button.octoprint_restart_server
                      secondary: RPI4
                      icon: mdi:restart
                      icon_color: orange
                      layout: vertical
                      tap_action:
                        action: toggle
  - type: conditional
    conditions:
      - entity: binary_sensor.octoprint_printing
        state_not: 'on'
      - entity: input_boolean.octopi_marceline_on_off
        state: 'on'
      - entity: switch.octoprint_connect_to_printer
        state: 'on'
    card:
      type: vertical-stack
      title: X/Y                  Z
      cards:
        - type: vertical-stack
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:mushroom-entity-card
                  entity: null
                  icon: mdi:void
                - type: custom:mushroom-entity-card
                  entity: input_boolean.input_boolean_octo_controls
                  icon: mdi:arrow-up-bold
                  tap_action:
                    action: call-service
                    service: mqtt.publish
                    target: {}
                    data:
                      topic: octoPrint/hassControl/jog
                      payload: '{"y": -10, "speed": 0.5}'
                      qos: 0
                      retain: false
                  primary_info: none
                  icon_color: orange
                  fill_container: false
                  secondary_info: none
                  layout: horizontal
                - type: custom:mushroom-entity-card
                  entity: null
                  icon: mdi:void
                - type: custom:mushroom-entity-card
                  entity: input_boolean.input_boolean_octo_controls
                  icon: mdi:arrow-up-bold
                  tap_action:
                    action: call-service
                    service: mqtt.publish
                    target: {}
                    data:
                      topic: octoPrint/hassControl/jog
                      payload: '{"z": 10, "speed": 0.5}'
                      qos: 0
                      retain: false
                  primary_info: none
                  icon_color: orange
                  fill_container: false
                  secondary_info: none
                  layout: horizontal
            - type: horizontal-stack
              cards:
                - type: custom:mushroom-entity-card
                  entity: input_boolean.input_boolean_octo_controls
                  icon: mdi:arrow-left-bold
                  tap_action:
                    action: call-service
                    service: mqtt.publish
                    target: {}
                    data:
                      topic: octoPrint/hassControl/jog
                      payload: '{"x": -10, "speed": 0.5}'
                      qos: 0
                      retain: false
                  primary_info: none
                  icon_color: orange
                  fill_container: false
                  secondary_info: none
                  layout: vertical
                  name: 'X '
                - type: custom:mushroom-entity-card
                  entity: input_boolean.input_boolean_octo_controls
                  tap_action:
                    action: call-service
                    service: mqtt.publish
                    target: {}
                    data:
                      topic: octoPrint/hassControl/home
                      payload: '["x", "y", "z"]'
                      qos: 0
                      retain: false
                  primary_info: none
                  icon_color: green
                  fill_container: false
                  icon: mdi:home
                  secondary_info: none
                  layout: horizontal
                - type: custom:mushroom-entity-card
                  entity: input_boolean.input_boolean_octo_controls
                  icon: mdi:arrow-right-bold
                  tap_action:
                    action: call-service
                    service: mqtt.publish
                    target: {}
                    data:
                      topic: octoPrint/hassControl/jog
                      payload: '{"x": 10, "speed": 0.5}'
                      qos: 0
                      retain: false
                  primary_info: none
                  icon_color: orange
                  fill_container: false
                  secondary_info: none
                  layout: horizontal
                - type: custom:mushroom-entity-card
                  entity: input_boolean.input_boolean_octo_controls
                  tap_action:
                    action: call-service
                    service: mqtt.publish
                    target: {}
                    data:
                      topic: octoPrint/hassControl/home
                      payload: '["x", "y", "z"]'
                      qos: 0
                      retain: false
                  primary_info: none
                  icon_color: green
                  fill_container: false
                  icon: mdi:home
                  secondary_info: none
                  layout: horizontal
            - type: horizontal-stack
              cards:
                - type: custom:mushroom-entity-card
                  entity: null
                  icon: mdi:void
                - type: custom:mushroom-entity-card
                  entity: input_boolean.input_boolean_octo_controls
                  icon: mdi:arrow-down-bold
                  tap_action:
                    action: call-service
                    service: mqtt.publish
                    target: {}
                    data:
                      topic: octoPrint/hassControl/jog
                      payload: '{"y": 10, "speed": 0.5}'
                      qos: 0
                      retain: false
                  primary_info: none
                  icon_color: orange
                  fill_container: false
                  secondary_info: none
                  layout: horizontal
                - type: custom:mushroom-entity-card
                  entity: null
                  icon: mdi:void
                - type: custom:mushroom-entity-card
                  entity: input_boolean.input_boolean_octo_controls
                  icon: mdi:arrow-down-bold
                  tap_action:
                    action: call-service
                    service: mqtt.publish
                    target: {}
                    data:
                      topic: octoPrint/hassControl/jog
                      payload: '{"z": -10, "speed": 0.5}'
                      qos: 0
                      retain: false
                  primary_info: none
                  icon_color: orange
                  fill_container: false
                  secondary_info: none
                  layout: horizontal
  - type: conditional
    conditions:
      - entity: binary_sensor.octoprint_printing
        state_not: 'on'
      - condition: state
        entity: switch.octoprint_connect_to_printer
        state: o9
    card:
      type: custom:swipe-card
      card_width: 185px
      start_card: 1
      reset_after: 10
      parameters:
        spaceBetween: 8
        scrollbar:
          hide: false
          draggable: true
          snapOnRelease: true
      cards:
        - type: vertical-stack
          title: 'Mouvement des moteurs : X , Y'
          cards:
            - type: vertical-stack
              cards:
                - type: horizontal-stack
                  cards:
                    - type: custom:mushroom-entity-card
                      entity: null
                      icon: mdi:void
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      icon: mdi:arrow-up-bold
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/jog
                          payload: '{"y": -10, "speed": 0.5}'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: orange
                      fill_container: false
                      secondary_info: none
                      layout: horizontal
                    - type: custom:mushroom-entity-card
                      entity: null
                      icon: mdi:void
                - type: horizontal-stack
                  cards:
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      icon: mdi:arrow-left-bold
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/jog
                          payload: '{"x": -10, "speed": 0.5}'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: orange
                      fill_container: false
                      secondary_info: none
                      layout: vertical
                      name: 'X '
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/home
                          payload: '["x", "y", "z"]'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: green
                      fill_container: false
                      icon: mdi:home
                      secondary_info: none
                      layout: horizontal
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      icon: mdi:arrow-right-bold
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/jog
                          payload: '{"x": 10, "speed": 0.5}'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: orange
                      fill_container: false
                      secondary_info: none
                      layout: horizontal
                - type: horizontal-stack
                  cards:
                    - type: custom:mushroom-entity-card
                      entity: null
                      icon: mdi:void
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      icon: mdi:arrow-down-bold
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/jog
                          payload: '{"y": 10, "speed": 0.5}'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: orange
                      fill_container: false
                      secondary_info: none
                      layout: horizontal
                    - type: custom:mushroom-entity-card
                      entity: null
                      icon: mdi:void
        - type: vertical-stack
          title: 'Mouvement des moteurs : X , Z'
          cards:
            - type: vertical-stack
              cards:
                - type: horizontal-stack
                  cards:
                    - type: custom:mushroom-entity-card
                      entity: null
                      icon: mdi:void
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      icon: mdi:arrow-up-bold
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/jog
                          payload: '{"z": 10, "speed": 0.5}'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: orange
                      fill_container: false
                      secondary_info: none
                      layout: horizontal
                    - type: custom:mushroom-entity-card
                      entity: null
                      icon: mdi:void
                - type: horizontal-stack
                  cards:
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      icon: mdi:arrow-left-bold
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/jog
                          payload: '{"x": 10, "speed": 0.5}'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: orange
                      fill_container: false
                      secondary_info: none
                      layout: vertical
                      name: 'X '
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/home
                          payload: '["x", "y", "z"]'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: green
                      fill_container: false
                      icon: mdi:home
                      secondary_info: none
                      layout: horizontal
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      icon: mdi:arrow-right-bold
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/jog
                          payload: '{"x": 10, "speed": 0.5}'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: orange
                      fill_container: false
                      secondary_info: none
                      layout: horizontal
                - type: horizontal-stack
                  cards:
                    - type: custom:mushroom-entity-card
                      entity: null
                      icon: mdi:void
                    - type: custom:mushroom-entity-card
                      entity: input_boolean.input_boolean_octo_controls
                      icon: mdi:arrow-down-bold
                      tap_action:
                        action: call-service
                        service: mqtt.publish
                        target: {}
                        data:
                          topic: octoPrint/hassControl/jog
                          payload: '{"z": -10, "speed": 0.5}'
                          qos: 0
                          retain: false
                      primary_info: none
                      icon_color: orange
                      fill_container: false
                      secondary_info: none
                      layout: horizontal
                    - type: custom:mushroom-entity-card
                      entity: null
                      icon: mdi:void
  - type: conditional
    conditions:
      - entity: binary_sensor.octoprint_printing
        state: 'on'
      - entity: switch.octoprint_connect_to_printer
        state: 'on'
    card:
      type: horizontal-stack
      cards:
        - type: vertical-stack
          title: Pilotage de l'impression
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:stack-in-card
                  mode: horizontal
                  keep:
                    background: true
                    border_radius: true
                    margin: true
                  cards:
                    - type: custom:mushroom-template-card
                      entity: button.octoprint_resume_job
                      secondary: Reprendre
                      icon: mdi:play
                      icon_color: green
                      layout: vertical
                      tap_action:
                        action: toggle
                    - type: custom:mushroom-template-card
                      entity: switch.octoprint_pause_print
                      secondary: Pause
                      icon: mdi:pause
                      icon_color: yellow
                      layout: vertical
                      tap_action:
                        action: toggle
                    - type: custom:mushroom-template-card
                      entity: button.octoprint_stop_job
                      secondary: Stop
                      icon: mdi:stop
                      icon_color: red
                      layout: vertical
                      hold_action:
                        action: toggle
                    - type: custom:mushroom-template-card
                      entity: button.octoprint_cancel_print
                      icon: mdi:cancel
                      secondary: Annuler
                      icon_color: red
                      layout: vertical
                      hold_action:
                        action: toggle
  - type: conditional
    conditions:
      - entity: binary_sensor.octoprint_printing
        state: 'on'
      - entity: switch.octoprint_connect_to_printer
        state: 'on'
    card:
      show_state: false
      show_name: true
      camera_view: live
      type: picture-entity
      entity: sensor.octoprint_print_file
      camera_image: camera.192_168_5_189
      name: Pièce en cours d'impression

Bon week end à tous.

2 « J'aime »