Message supprimé par son auteur
je l’avais acheter aussi
Message supprimé par son auteur
Non je l’ai filé a un pote qui devait prendre Starling car dans son bled c’est encore un vraie zone blanche
Message supprimé par son auteur
renseigne toi bien car je ne suis pas certain que l’on peut utiliser n’importe quel kit, mon pote m’a dit que c’était la merde avec starlink pour utiliser un kit qui appartenait a quelqu’un d’autre… donc méfiance
Message supprimé par son auteur
Bon j’ai tout rentré en espérant ne pas avoir fait trop de bêtises.
Pour l’instant la tuile m’indique porte ouverte alors qu’elle est fermée.
Si je clique sur fermeture j’ai bien l’icone qui clignote en orange mais il ne se passe rien…
Veux tu que je te revoie les codes avec le dernière modifications ?
Message supprimé par son auteur
ok et un grand merci pour le temps que tu passes sur mon problème
type: custom:button-card
name: Porte Garage
label: |
[[[
if (states['timer.timergarage'].state === 'active') return 'Fermeture';
if (states['binary_sensor.porte_garage'].state === 'off') return 'Ouverte';
if (states['binary_sensor.porte_garage'].state === 'on') return 'Fermée';
return 'État inconnu';
]]]
show_label: true
custom_fields:
my_icon:
card:
type: custom:button-card
icon: |
[[[
if (states['timer.timergarage'].state === 'active') return 'mdi:window-shutter-cog';
if (states['binary_sensor.porte_garage'].state === 'off') return 'mdi:window-shutter-open';
if (states['binary_sensor.porte_garage'].state === 'on') return 'mdi:window-shutter';
return 'mdi:window-shutter-alert';
]]]
styles:
card:
- background-color: rgba(44,44,44,1)
- border-radius: 50%
- width: 60px
- height: 60px
- display: flex
- align-items: center
- justify-content: center
- pointer-events: none
- cursor: default
icon:
- color: |
[[[
if (states['timer.timergarage'].state === 'active') return 'orange';
if (states['binary_sensor.porte_garage'].state === 'off') return 'red';
if (states['binary_sensor.porte_garage'].state === 'on') return 'green';
return 'lightgray';
]]]
- animation: |
[[[
return states['timer.timergarage'].state === 'active' ? 'blink 1.5s infinite' : 'none';
]]]
- width: 40px
button_up:
card:
type: custom:button-card
icon: mdi:arrow-up
tap_action:
action: call-service
service: script.garage_ouverture
styles:
card:
- background-color: rgba(44,44,44,1)
- width: 105px
- height: 42px
- pointer-events: |
[[[
return states['binary_sensor.porte_garage'].state === 'on' ? 'auto' : 'none';
]]]
- cursor: |
[[[
return states['binary_sensor.porte_garage'].state === 'on' ? 'pointer' : 'default';
]]]
icon:
- color: |
[[[
return states['binary_sensor.porte_garage'].state === 'on' ? 'rgba(255,255,255,0.8)' : 'rgba(255,255,255,0.1)';
]]]
button_down:
card:
type: custom:button-card
icon: mdi:arrow-down
tap_action:
action: call-service
service: script.garage_fermeture
styles:
card:
- background-color: rgba(44,44,44,1)
- width: 105px
- height: 42px
- pointer-events: |
[[[
return states['binary_sensor.porte_garage'].state === 'off' ? 'auto' : 'none';
]]]
- cursor: |
[[[
return states['binary_sensor.porte_garage'].state === 'off' ? 'pointer' : 'default';
]]]
icon:
- color: |
[[[
return states['binary_sensor.porte_garage'].state === 'off' ? 'rgba(255,255,255,0.8)' : 'rgba(255,255,255,0.1)';
]]]
styles:
card:
- height: 130px
- width: 250px
- background-color: rgba(28, 28, 28, 1)
- border-radius: 12px
- box-shadow: none
- border: 1px solid rgba(44,44,44,1)
- pointer-events: |
[[[
return (['Ouverte', 'Fermée'].includes(states['input_select.etatportegarage'].state)) ? 'none' : 'auto';
]]]
- cursor: |
[[[
return (['Ouverte', 'Fermée'].includes(states['input_select.etatportegarage'].state)) ? 'default' : 'pointer';
]]]
grid:
- grid-template-areas: >-
"my_icon n" "my_icon l" "button_up button_down" "timer_status
timer_status"
- grid-template-columns: 70px auto
- grid-template-rows: 30px 40px 42px 42px
- align-items: flex-start
- padding-left: 10px
name:
- font-size: 14px
- font-weight: bold
- color: rgba(255,255,255,0.8)
- justify-self: start
- text-align: left
label:
- font-size: 12px
- color: |
[[[
const s = states['timer.timergarage'].state;
return s === 'active' ? 'orange' : 'rgba(255,255,255,0.8)';
]]]
- justify-self: start
- text-align: left
- margin-top: 4px
custom_fields:
button_up:
- position: absolute
- top: 80px
- left: 15px
button_down:
- position: absolute
- top: 80px
- right: 15px
script fermeture
sequence:
- action: timer.start
metadata: {}
data: {}
target:
entity_id: timer.timergarage
- action: input_select.select_option
metadata: {}
data:
option: Fermeture
target:
entity_id: input_select.etatportegarage
alias: garage_fermeture
description: ""
script ouverture
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: binary_sensor.porte_garage
- action: input_select.select_option
metadata: {}
data:
option: Ouverte
target:
entity_id: input_select.etatportegarage
alias: garage_ouverture
description: ""
Message supprimé par son auteur
ah vraiment je suis stupide !!
le switch (contact de 0.5 secondes)
switch.sonoff_100173bbc2
Message supprimé par son auteur
OUI le prix ! j’utilise un abonnement B&You de 300 Go que je paye 10€ par mois j’avais choper cette méga promotion a noël !!
En attendant la fibre optique qui arrive le 21 mai dans mon super bled de 28 habitants
Message supprimé par son auteur
le sonoff est programmé en dur pour envoyer seulement une impulsion de 0.5 secondes donc ça devrait être bon pour cette partie là.
Mais c’est a quel endroit que je me suis planté dans le script ?
OK bon apéro y’a des priorités dans la vie
Il y a actuellement un B&you 5g 200G à 10€ et la meme chez sosh en 4G
Message supprimé par son auteur
Bon j’essaye de comprendre mais ce n’est pas gagné
coté code :
type: custom:button-card
name: Porte Garage
label: |
[[[
if (states['timer.timergarage'].state === 'active') return 'Fermeture';
if (states['binary_sensor.porte_garage'].state === 'on') return 'Ouverte';
if (states['binary_sensor.porte_garage'].state === 'off') return 'Fermée';
return 'État inconnu';
]]]
show_label: true
custom_fields:
my_icon:
card:
type: custom:button-card
icon: |
[[[
if (states['timer.timergarage'].state === 'active') return 'mdi:window-shutter-cog';
if (states['binary_sensor.porte_garage'].state === 'on') return 'mdi:window-shutter-open';
if (states['binary_sensor.porte_garage'].state === 'off') return 'mdi:window-shutter';
return 'mdi:window-shutter-alert';
]]]
styles:
card:
- background-color: rgba(44,44,44,1)
- border-radius: 50%
- width: 60px
- height: 60px
- display: flex
- align-items: center
- justify-content: center
- pointer-events: none
- cursor: default
icon:
- color: |
[[[
if (states['timer.timergarage'].state === 'active') return 'orange';
if (states['binary_sensor.porte_garage'].state === 'off') return 'red';
if (states['binary_sensor.porte_garage'].state === 'on') return 'green';
return 'lightgray';
]]]
- animation: |
[[[
return states['timer.timergarage'].state === 'active' ? 'blink 1.5s infinite' : 'none';
]]]
- width: 40px
button_up:
card:
type: custom:button-card
icon: mdi:arrow-up
tap_action:
action: call-service
service: script.garage_ouverture
styles:
card:
- background-color: rgba(44,44,44,1)
- width: 105px
- height: 42px
- pointer-events: |
[[[
return states['binary_sensor.porte_garage'].state === 'on' ? 'auto' : 'none';
]]]
- cursor: |
[[[
return states['binary_sensor.porte_garage'].state === 'on' ? 'pointer' : 'default';
]]]
icon:
- color: |
[[[
return states['binary_sensor.porte_garage'].state === 'on' ? 'rgba(255,255,255,0.8)' : 'rgba(255,255,255,0.1)';
]]]
button_down:
card:
type: custom:button-card
icon: mdi:arrow-down
tap_action:
action: call-service
service: script.garage_fermeture
styles:
card:
- background-color: rgba(44,44,44,1)
- width: 105px
- height: 42px
- pointer-events: |
[[[
return states['binary_sensor.porte_garage'].state === 'off' ? 'auto' : 'none';
]]]
- cursor: |
[[[
return states['binary_sensor.porte_garage'].state === 'off' ? 'pointer' : 'default';
]]]
icon:
- color: |
[[[
return states['binary_sensor.porte_garage'].state === 'off' ? 'rgba(255,255,255,0.8)' : 'rgba(255,255,255,0.1)';
]]]
styles:
card:
- height: 130px
- width: 250px
- background-color: rgba(28, 28, 28, 1)
- border-radius: 12px
- box-shadow: none
- border: 1px solid rgba(44,44,44,1)
- pointer-events: |
[[[
return (['Ouverte', 'Fermée'].includes(states['input_select.etatportegarage'].state)) ? 'none' : 'auto';
]]]
- cursor: |
[[[
return (['Ouverte', 'Fermée'].includes(states['input_select.etatportegarage'].state)) ? 'default' : 'pointer';
]]]
grid:
- grid-template-areas: >-
"my_icon n" "my_icon l" "button_up button_down" "timer_status
timer_status"
- grid-template-columns: 70px auto
- grid-template-rows: 30px 40px 42px 42px
- align-items: flex-start
- padding-left: 10px
name:
- font-size: 14px
- font-weight: bold
- color: rgba(255,255,255,0.8)
- justify-self: start
- text-align: left
label:
- font-size: 12px
- color: |
[[[
const s = states['timer.timergarage'].state;
return s === 'active' ? 'orange' : 'rgba(255,255,255,0.8)';
]]]
- justify-self: start
- text-align: left
- margin-top: 4px
custom_fields:
button_up:
- position: absolute
- top: 80px
- left: 15px
button_down:
- position: absolute
- top: 80px
- right: 15px
donc là c’est bon la porte est fermée et l’icone est en rouge, par contre je n’ai pas la commande d’ouverture disponible…
coté script ouverture
sequence:
- action: switch.sonoff_100173bbc2
metadata: {}
data: {}
target:
entity_id: binary_sensor.porte_garage
- action: input_select.select_option
metadata: {}
data:
option: Ouverte
target:
entity_id: input_select.etatportegarage
alias: garage_ouverture
description: ""
Script fermeture
sequence:
- action: timer.start
metadata: {}
data: {}
target:
entity_id: timer.timergarage
- action: input_select.select_option
metadata: {}
data:
option: Fermeture
target:
entity_id: input_select.etatportegarage
alias: garage_fermeture
description: ""