bon bah ca avance pas mal
petits screens vite fait de l’avancé :
état du status sans impression en cours :
Gestion de 2 box avec 14 couleurs de filaments (rouleau de 1kg, 750g, 500g, donc de longueur differentes).
comme souhaité, merci @Clemalex lorsqu’une impression est lancée, Lovelace me demande quelle couleur de filament est utilisé, en cliquant sur la couleur de la bobine, le niveau de celle ci se met à jour.
Bar-card permet de garder la proportion entre une bobine de filament de 330 (1kg) et celle de 750g (250m) et 500g (166m).
Si un des rouleaux est en dessous de x metres, l’icone se change en petit panneau Alerte /!\ et je recois une notif sur télégram
Pour le changement de bobine, donc le reset, la remise à zéro du compteur pour une couleur, j’ai fais comme ceci :
Les petits soucis maintenant …
1/ je ne trouve pas pourquoi ces icones ont pris la couleur de mon theme et pas les autres, quoi qu’il en soit je les préfère en blanc :
2/ changer la couleur de la police des bar-card:
3/ enlever la decimale du compteur :
Le code la carte :
type: vertical-stack
cards:
- type: 'custom:stack-in-card'
cards:
- type: conditional
conditions:
- entity: sensor.octoprint_current_state
state: Printing
card:
type: 'custom:stack-in-card'
cards:
- type: markdown
content: >-
<font color="#25a2db"> Une impression 3D est détectée. De quelle
bobine <font color="#800080"><ha-icon
icon="mdi:ubisoft"></ha-icon></font> s'agit t'il ?
</font>
- direction: up
entities:
- color: black
entity: input_number.filament_noir_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: black
- from: '50'
to: '330'
color: black
icon: 'mdi:printer-3d-nozzle'
max: '330'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_noir
- color: white
entity: input_number.filament_blanc_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: white
- from: '50'
to: '330'
color: white
icon: 'mdi:printer-3d-nozzle'
max: '330'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_blanc
- color: red
entity: input_number.filament_rouge_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: red
- from: '50'
to: '250'
color: red
icon: 'mdi:printer-3d-nozzle'
max: '250'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_rouge
- color: blue
entity: input_number.filament_bleu_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: blue
- from: '50'
to: '166'
color: blue
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_bleu
- color: green
entity: input_number.filament_vert_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: green
- from: '50'
to: '166'
color: green
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_vert
- color: yellow
entity: input_number.filament_jaune_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: yellow
- from: '50'
to: '166'
color: yellow
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_jaune
- color: orange
entity: input_number.filament_orange_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: orange
- from: '50'
to: '166'
color: orange
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_orange
height: 200px
max: 100
min: 0
padding: 2px
positions:
icon: inside
title: outside
indicator: 'off'
stack: horizontal
style: >-
bar-card-title {
text-shadow: none;
}
ha-icon {
color: white;
}
bar-card-card:nth-child(1) ha-icon,bar-card-card:nth-child(2)
ha-icon {
color: var(--primary-color);
}
bar-card-value {
text-shadow: none;
color: white;
}
bar-card-currentbar {
border-radius: 10px;
}
bar-card-backgroundbar {
border-radius: 10px;
}
bar-card-card:nth-child(5) bar-card-value{
text-shadow: none;
color: black;
}
type: 'custom:bar-card'
unit_of_measurement: m
- type: conditional
conditions:
- entity: sensor.octoprint_current_state
state: Operational
card:
direction: up
entities:
- color: black
entity: input_number.filament_noir_restant
icon: 'mdi:ubisoft'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: black
- from: '50'
to: '330'
color: black
icon: 'mdi:ubisoft'
max: '330'
min: '0'
- color: white
entity: input_number.filament_blanc_restant
icon: 'mdi:ubisoft'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: white
- from: '50'
to: '330'
color: white
icon: 'mdi:ubisoft'
max: '330'
min: '0'
- color: red
entity: input_number.filament_rouge_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: red
- from: '50'
to: '250'
color: red
icon: 'mdi:ubisoft'
max: '250'
min: '0'
- color: blue
entity: input_number.filament_bleu_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: blue
- from: '50'
to: '166'
color: blue
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: green
entity: input_number.filament_vert_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: green
- from: '50'
to: '166'
color: green
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: yellow
entity: input_number.filament_jaune_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: yellow
- from: '50'
to: '166'
color: yellow
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: orange
entity: input_number.filament_orange_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: orange
- from: '50'
to: '166'
color: orange
icon: 'mdi:ubisoft'
max: '166'
min: '0'
height: 200px
max: 100
min: 0
padding: 2px
positions:
icon: inside
title: outside
indicator: 'off'
stack: horizontal
style: >-
bar-card-title {
text-shadow: none;
}
ha-icon {
color: white;
}
bar-card-card:nth-child(1) ha-icon,bar-card-card:nth-child(2)
ha-icon {
color: var(--primary-color);
}
bar-card-value {
text-shadow: none;
color: white;
}
bar-card-currentbar {
border-radius: 10px;
}
bar-card-backgroundbar {
border-radius: 10px;
}
bar-card-card:nth-child(5) bar-card-value{
text-shadow: none;
color: black;
}
type: 'custom:bar-card'
unit_of_measurement: m
- type: 'custom:stack-in-card'
cards:
- type: conditional
conditions:
- entity: sensor.octoprint_current_state
state: Printing
card:
type: 'custom:stack-in-card'
cards:
- type: markdown
content: '<font color="#25a2db"> Box 2 ? </font>'
- direction: up
entities:
- color: silver
entity: input_number.filament_argent_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: silver
- from: '50'
to: '166'
color: silver
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_argent
- color: gold
entity: input_number.filament_or_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: gold
- from: '50'
to: '166'
color: gold
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_or
- color: '#A0522D'
entity: input_number.filament_marron_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: '#A0522D'
- from: '50'
to: '166'
color: '#A0522D'
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_marron
- color: '#D2691E'
entity: input_number.filament_marron_leger_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: '#D2691E'
- from: '50'
to: '166'
color: '#D2691E'
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_marron_leger
- color: '#8B4513'
entity: input_number.filament_marron_fonce_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: '#8B4513'
- from: '50'
to: '166'
color: '#8B4513'
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_marron_fonce
- color: grey
entity: input_number.filament_gris_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: grey
- from: '50'
to: '166'
color: grey
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_gris
- color: '#FF1493'
entity: input_number.filament_rose_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: '#FF1493'
- from: '50'
to: '166'
color: '#FF1493'
icon: 'mdi:printer-3d-nozzle'
max: '166'
min: '0'
tap_action:
action: call-service
service: script.mise_a_jour_bobine_rose
height: 200px
max: 100
min: 0
padding: 2px
positions:
icon: inside
title: outside
indicator: 'off'
stack: horizontal
style: >-
bar-card-title {
text-shadow: none;
}
ha-icon {
color: white;
}
bar-card-card:nth-child(1) ha-icon,bar-card-card:nth-child(2)
ha-icon {
color: var(--primary-color);
}
bar-card-value {
text-shadow: none;
color: white;
}
bar-card-currentbar {
border-radius: 10px;
}
bar-card-backgroundbar {
border-radius: 10px;
}
bar-card-card:nth-child(5) bar-card-value{
text-shadow: none;
color: black;
}
type: 'custom:bar-card'
unit_of_measurement: m
- type: conditional
conditions:
- entity: sensor.octoprint_current_state
state: Operational
card:
direction: up
entities:
- color: silver
entity: input_number.filament_argent_restant
icon: 'mdi:ubisoft'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: silver
- from: '50'
to: '166'
color: silver
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: gold
entity: input_number.filament_or_restant
icon: 'mdi:ubisoft'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: gold
- from: '50'
to: '166'
color: gold
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: '#A52A2A'
entity: input_number.filament_marron_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: '#A0522D'
- from: '50'
to: '166'
color: '#A0522D'
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: '#D2691E'
entity: input_number.filament_marron_leger_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: '#D2691E'
- from: '50'
to: '166'
color: '#D2691E'
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: '#8B4513'
entity: input_number.filament_marron_fonce_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: '#8B4513'
- from: '50'
to: '166'
color: '#8B4513'
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: grey
entity: input_number.filament_gris_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: grey
- from: '50'
to: '166'
color: grey
icon: 'mdi:ubisoft'
max: '166'
min: '0'
- color: '#FF1493'
entity: input_number.filament_rose_restant
icon: 'mdi:printer-3d-nozzle'
name: ' '
severity:
- from: '1'
to: '50'
icon: 'mdi:alert'
color: '#FF1493'
- from: '50'
to: '166'
color: '#FF1493'
icon: 'mdi:ubisoft'
max: '166'
min: '0'
height: 200px
max: 100
min: 0
padding: 2px
positions:
icon: inside
title: outside
indicator: 'off'
stack: horizontal
style: >-
bar-card-title {
text-shadow: none;
}
ha-icon {
color: white;
}
bar-card-card:nth-child(1) ha-icon,bar-card-card:nth-child(2)
ha-icon {
color: var(--primary-color);
}
bar-card-value {
text-shadow: none;
color: white;
}
bar-card-currentbar {
border-radius: 10px;
}
bar-card-backgroundbar {
border-radius: 10px;
}
bar-card-card:nth-child(5) bar-card-value{
text-shadow: none;
color: black;
}
type: 'custom:bar-card'
unit_of_measurement: m
- type: vertical-stack
cards:
- type: entities
entities:
- entity: input_boolean.reset_filament
- type: conditional
conditions:
- entity: input_boolean.reset_filament
state: 'on'
card:
type: entities
entities:
- entity: input_number.filament_noir_restant
- entity: input_number.filament_blanc_restant
- entity: input_number.filament_rouge_restant
- entity: input_number.filament_bleu_restant
- entity: input_number.filament_vert_restant
- entity: input_number.filament_jaune_restant
- entity: input_number.filament_orange_restant
- entity: input_number.filament_argent_restant
- entity: input_number.filament_or_restant
- entity: input_number.filament_marron_restant
- entity: input_number.filament_marron_leger_restant
- entity: input_number.filament_marron_fonce_restant
- entity: input_number.filament_gris_restant
- entity: input_number.filament_rose_restant
state_color: true
voila voila, donc si vous avez une idée pour ces 3 petits soucis, ok c’est du détail mais quand meme lol
(ca sent le tuto de 3 pages lol)