Ce qui est pas bô c’est le logo reolink sur l’image
Ca il doit y avoir moyen de le virer depuis l’interface web, non ?
J’ai enfin trouvé comment agir sur la carte Frigate depuis un bouton externe. Il va falloir que j’affine un peu et voir si ça fonctionne avec le menu en hidden.
Dans l’appli reolink, rubrique affichage
J’ai pas regardé dans l’interface web mais ça doit être pareil.
Sinon, super pour interagir avec la carte
Sur l’interface web tu peux masquer l’affichage de la date et l’heure et le nom de la caméra en bas à droite. J’ai pas trouvé pour le logo.
Filigrane dans l’app
Je vais pouvoir retravailler mon masque sur mon tableau de bord
Faut aussi que je change mon image pour le haut-parleur, on dirait plus un sèche-cheveux…
Le code de la carte avec ce qu’il faut pour piloter la sourdine depuis un bouton externe avec un input_boolean :
type: custom:frigate-card
cameras:
- camera_entity: camera.reolink
live_provider: go2rtc
go2rtc:
modes:
- webrtc
menu:
buttons:
microphone:
enabled: true
alignment: opposing
timeline:
enabled: false
cameras:
enabled: false
frigate:
enabled: false
download:
enabled: false
media_player:
enabled: false
mute:
enabled: true
alignment: opposing
camera_ui:
enabled: false
substreams:
enabled: false
live:
enabled: false
clips:
enabled: false
snapshots:
enabled: false
fullscreen:
enabled: false
style: overlay
position: bottom
button_size: 50
live:
controls:
thumbnails:
mode: none
auto_mute: all
preload: false
dimensions: {}
media_gallery:
controls:
thumbnails:
size: 140
show_favorite_control: false
show_timeline_control: false
show_download_control: false
filter:
mode: none
elements:
- type: custom:frigate-card-conditional
elements:
- type: icon
icon: mdi:volume-off
title: Sourdine
style:
left: 100px
top: 340px
conditions:
view:
- live
camera:
- camera.reolink
state:
- entity: input_boolean.maison_sonnette_sourdine
state: 'on'
state_not: 'off'
automations:
- conditions:
state:
- entity: input_boolean.maison_sonnette_sourdine
state: 'on'
state_not: 'off'
actions:
- action: custom:frigate-card-action
frigate_card_action: unmute
actions_not:
- action: custom:frigate-card-action
frigate_card_action: mute
how did you manage to make this work? HA entity state is not working for me as a condition.
automations:
- conditions:
state:
- entity: input_boolean.maison_sonnette_sourdine
state: 'on'
state_not: 'off'
actions:
- action: custom:frigate-card-action
frigate_card_action: unmute
actions_not:
- action: custom:frigate-card-action
frigate_card_action: mute
but when i use frigate card built in condition example : fullscreen its working fine.
automations:
- conditions:
fullscreen: true
C’est pour toi.
Dans la langue que tu maîtrise en plus
Va falloir qu’il attende au moins jusqu’à 22h00 et de toute façon, je ne répondrais que si l’Espagne gagne la coupe d’Europe…
Je ne sais pas pourquoi celà fonctionne chez moi mais ça fonctionne :
custom_fields:
carte_sonnette:
card:
type: custom:button-card
custom_fields:
bouton_reduire:
card:
type: custom:button-card
styles:
card:
- background-color: rgba(255,255,255,0.0)
- background-image: url(/local/images/icones/reduce_size.png)
- background-size: cover
- box-shadow: 2px 2px 4px 0px rgba(32,32,32,0.5)
- border: 2px rgba(211,211,211,1.0) outset
- border-radius: 50%
- height: 72px
- width: 72px
- '--mdc-ripple-press-opacity': 0.12
tap_action:
action: call-service
service: script.tableau_de_bord_menu
service_data:
carte: '[[[ return "1"; ]]]'
hold_action:
action: none
bouton_microphone:
card:
type: custom:button-card
styles:
card:
- background-color: rgba(255,255,255,0.0)
- background-image: |
[[[
if (states['input_boolean.maison_sonnette_microphone'].state == 'on')
return 'url(/local/images/icones/micro_talk.png)';
else
return 'url(/local/images/icones/micro_off.png)';
]]]
- background-size: cover
- box-shadow: 2px 2px 4px 0px rgba(32,32,32,0.5)
- border: 2px rgba(211,211,211,1.0) outset
- border-radius: 50%
- height: 72px
- width: 72px
- '--mdc-ripple-press-opacity': 0.12
tap_action:
action: call-service
service: script.maison_sonnette_basculer_microphone
bouton_sourdine:
card:
type: custom:button-card
styles:
card:
- background-color: rgba(255,255,255,0.0)
- background-image: |
[[[
if (states['input_boolean.maison_sonnette_sourdine'].state == 'on')
return 'url(/local/images/icones/mute_off.png)';
else
return 'url(/local/images/icones/mute_on.png)';
]]]
- background-size: cover
- box-shadow: 2px 2px 4px 0px rgba(32,32,32,0.5)
- border: 2px rgba(211,211,211,1.0) outset
- border-radius: 50%
- height: 72px
- width: 72px
- '--mdc-ripple-press-opacity': 0.12
tap_action:
action: call-service
service: script.maison_sonnette_basculer_sourdine
bouton_capture:
card:
type: custom:button-card
styles:
card:
- background-color: rgba(255,255,255,0.0)
- background-image: url(/local/images/icones/snapshot.png)
- background-size: cover
- box-shadow: 2px 2px 4px 0px rgba(32,32,32,0.5)
- border: 2px rgba(211,211,211,1.0) outset
- border-radius: 50%
- height: 72px
- width: 72px
- '--mdc-ripple-press-opacity': 0.12
tap_action:
action: call-service
service: script.maison_sonnette_capture_d_ecran
bouton_serrure_portillon:
card:
type: custom:button-card
styles:
card:
- background-color: rgba(255,255,255,0.0)
- background-image: url(/local/images/icones/serrure.png)
- background-size: cover
- box-shadow: none
- border: 1px rgba(211,211,211,1.0) outset
- border-radius: 50%
- height: 72px
- width: 72px
- opacity: 20%
- '--mdc-ripple-press-opacity': 0.12
tap_action:
action: none
styles:
card:
- background-image: >-
linear-gradient(135deg, rgba(64,64,64,1.0) 0%,
rgba(96,96,96,1.0) 25%, rgba(128,128,128,1.0) 100%)
- border-radius: 10px
- box-shadow: 4px 4px 8px 0px rgba(32,32,32,0.5)
- border: 2px rgba(32,32,32,0.5) outset
- height: 628px
- width: 813px
- top: 10px
- left: 5px
- '--mdc-ripple-press-opacity': 0
custom_fields:
bouton_reduire:
- position: absolute
- top: 535px
- left: 20px
bouton_microphone:
- position: absolute
- top: 535px
- left: 350px
bouton_sourdine:
- position: absolute
- top: 535px
- left: 442px
bouton_capture:
- position: absolute
- top: 535px
- left: 175px
bouton_serrure_portillon:
- position: absolute
- top: 535px
- left: 718px
video:
card:
type: custom:mod-card
card:
type: custom:frigate-card
card-id: sonnette
cameras:
- camera_entity: camera.reolink
live_provider: go2rtc
go2rtc:
modes:
- webrtc
menu:
buttons:
microphone:
enabled: true
alignment: matching
timeline:
enabled: false
cameras:
enabled: false
frigate:
enabled: false
download:
enabled: false
media_player:
enabled: false
mute:
enabled: true
alignment: matching
camera_ui:
enabled: false
substreams:
enabled: false
live:
enabled: false
clips:
enabled: false
snapshots:
enabled: false
fullscreen:
enabled: true
style: overlay
position: right
button_size: 40
live:
controls:
thumbnails:
mode: none
auto_mute: all
preload: false
dimensions: {}
media_gallery:
controls:
thumbnails:
size: 140
show_favorite_control: false
show_timeline_control: false
show_download_control: false
filter:
mode: none
elements:
- type: custom:frigate-card-conditional
elements:
- type: icon
icon: mdi:volume
title: Sourdine
style:
left: 100px
top: 500px
conditions:
view:
- live
camera:
- camera.reolink
state:
- entity: input_boolean.maison_sonnette_sourdine
state: 'on'
state_not: 'off'
- type: custom:frigate-card-conditional
elements:
- type: icon
icon: mdi:microphone-off
title: Microphone
style:
left: 200px
top: 500px
conditions:
view:
- live
camera:
- camera.reolink
state:
- entity: input_boolean.maison_sonnette_microphone
state: 'on'
state_not: 'off'
automations:
- conditions:
state:
- entity: input_boolean.maison_sonnette_sourdine
state: 'on'
state_not: 'off'
actions:
- action: custom:frigate-card-action
frigate_card_action: unmute
actions_not:
- action: custom:frigate-card-action
frigate_card_action: mute
- conditions:
state:
- entity: input_boolean.maison_sonnette_microphone
state: 'on'
state_not: 'off'
actions:
- action: custom:frigate-card-action
frigate_card_action: microphone_unmute
actions_not:
- action: custom:frigate-card-action
frigate_card_action: microphone_mute
styles: null
card_mod:
style: |
ha-card {
border: 2px inset darkgrey !important;
border-radius: 0px !important;
position: absolute !important;
z-index: {{ '1' if states('input_number.tableau_de_bord_carte_courante') == '22.0' else '0' }} !important;
top: {{ '80px' if states('input_number.tableau_de_bord_carte_courante') == '22.0' else '800px' }} !important;
left: {{ '130px' if states('input_number.tableau_de_bord_carte_courante') == '22.0' else '1000px' }} !important;
width: {{ '598px' if states('input_number.tableau_de_bord_carte_courante') == '22.0' else '0px' }} !important;
}
masque_sonnette:
card:
type: custom:button-card
styles:
card:
- background-color: rgba(255,255,255,0.0)
- background-image: url(/local/images/masque_sonnette.png)
- background-size: cover
- box-shadow: none
- border: none
- border-radius: 0
- height: 450px
- width: 30px
- margin-top: 80px
- left: 100px
- z-index: 1
tap_action:
action: none
hold_action:
action: none
styles:
card:
- background-color: rgba(128,128,128,1.0)
- border: 2px outset darkgrey
- width: 836px
- height: 673px
- border-radius: 1%
- padding-left: 5px
- margin-top: '-3px'
- margin-left: '-6px'
name:
- font-size: 0.9em
- font-weight: bold
- justify-self: start
- align-self: start
- margin-top: '-30px'
- color: lightgrey
custom_fields:
carte_sonnette:
- position: absolute
- top: 20px
- left: 5px
- opacity: |
[[[
if (states['input_number.tableau_de_bord_carte_courante'].state == '22.0')
return '100%';
else
return '0%';
]]]
- z-index: |
[[[
if (states['input_number.tableau_de_bord_carte_courante'].state == '22.0')
return '1';
else
return '-1';
]]]
masque_sonnette:
- position: absolute
- top: 0px
- left: 600px
- opacity: |
[[[
if (states['input_number.tableau_de_bord_carte_courante'].state == '22.0')
return '0%';
else
return '0%';
]]]
view_layout:
grid-area: cartes
@Cleya
Thanks for showing me your code, i really appreciate it.
by the way what does the script.tableau_de_bord_menu and maison_sonnette_basculer_microphone
do?
can you show me the code of those script? thanks!
Bonjour,
c’est un forum français, on parle en français.
Merci d’y faire attention les prochaines fois.
Le script maison_sonnette_basculer_microphone est juste un script qui permet de basculer (toggle) l’input_boolean du microphone :
alias: Maison - Sonnette basculer microphone
sequence:
- service: input_boolean.toggle
metadata: {}
data: {}
target:
entity_id: input_boolean.maison_sonnette_microphone
description: ""
L’autre script n’a pas de lien avec la carte Frigate mais juste avec le tableau de bord. Il affiche la carte en lien avec les boutons du menu à gauche (les 19 boutons).
il semble que la frégate ne voit pas ou ne détecte pas mon état HA input_boolean. je me demande si cela a à voir avec mqtt ou autres ?
ci-dessous le code exact de l’automatisation mu dans la carte de frégate
automations:
- conditions:
state:
- entity: input_boolean.switch
state: 'on'
state_not: 'off'
actions:
- action: custom:frigate-card-action
frigate_card_action: microphone_unmute
actions_not:
- action: custom:frigate-card-action
frigate_card_action: _microphone_mute
pls answer in english i just translated this reply via google translate. thanks!
@Cleya
quelle version de carte frégate utilisez-vous ?
Bonjour, je pense que c’est la dernière version.
Déjà, il y a un « _ » en trop avant microphone_mute :
automations:
- conditions:
state:
- entity: input_boolean.switch
state: 'on'
state_not: 'off'
actions:
- action: custom:frigate-card-action
frigate_card_action: microphone_unmute
actions_not:
- action: custom:frigate-card-action
frigate_card_action: _microphone_mute
Par ailleurs, pour tester, il vaut mieux utiliser la sourdine car je pense que le « microphone_mute » est prévu pour être actif pendant une durée donnée. Mon bouton ne permet pas de le désactiver, il se désactive automatiquement au bout d’un certain temps.
Voici une version simplifiée du code, il suffit juste de créer deux « Helpers », un input_boolean pour le « microphone » et un input_boolean pour le « mute » :
Le code :
type: horizontal-stack
cards:
- type: custom:frigate-card
card-id: sonnette
cameras:
- camera_entity: camera.reolink
live_provider: go2rtc
go2rtc:
modes:
- webrtc
menu:
buttons:
microphone:
enabled: true
alignment: matching
timeline:
enabled: false
cameras:
enabled: false
frigate:
enabled: false
download:
enabled: false
media_player:
enabled: false
mute:
enabled: true
alignment: matching
camera_ui:
enabled: false
substreams:
enabled: false
live:
enabled: false
clips:
enabled: false
snapshots:
enabled: false
fullscreen:
enabled: true
style: overlay
position: bottom
button_size: 50
live:
controls:
thumbnails:
mode: none
auto_mute: all
preload: false
dimensions: {}
media_gallery:
controls:
thumbnails:
size: 140
show_favorite_control: false
show_timeline_control: false
show_download_control: false
filter:
mode: none
elements:
- type: custom:frigate-card-conditional
elements:
- type: icon
icon: mdi:volume
title: Sourdine
style:
left: 100px
top: 500px
conditions:
view:
- live
camera:
- camera.reolink
state:
- entity: input_boolean.maison_sonnette_sourdine
state: 'on'
state_not: 'off'
- type: custom:frigate-card-conditional
elements:
- type: icon
icon: mdi:microphone-off
title: Microphone
style:
left: 200px
top: 500px
conditions:
view:
- live
camera:
- camera.reolink
state:
- entity: input_boolean.maison_sonnette_microphone
state: 'on'
state_not: 'off'
automations:
- conditions:
state:
- entity: input_boolean.maison_sonnette_sourdine
state: 'on'
state_not: 'off'
actions:
- action: custom:frigate-card-action
frigate_card_action: unmute
actions_not:
- action: custom:frigate-card-action
frigate_card_action: mute
- conditions:
state:
- entity: input_boolean.maison_sonnette_microphone
state: 'on'
state_not: 'off'
actions:
- action: custom:frigate-card-action
frigate_card_action: microphone_unmute
actions_not:
- action: custom:frigate-card-action
frigate_card_action: microphone_mute
styles: null
- type: vertical-stack
cards:
- show_name: false
show_icon: true
type: button
tap_action:
action: toggle
entity: input_boolean.maison_sonnette_microphone
icon: mdi:microphone
hold_action:
action: none
- show_name: false
show_icon: true
type: button
tap_action:
action: toggle
entity: input_boolean.maison_sonnette_sourdine
icon: mdi:volume-off
hold_action:
action: none