Hi there,
I would like to display the list of missed phone calls on my dashboard, but I find no correct way of doing it.
I explain … I have a fritzbox which is allowing to detect ring states (ringing, idle, busy, …) and phone number calling me.
I have already created on top an automation who is incrementing a counter each time I have a missed call (0, 1, 2, 3, …)
I have created a persistant notification (and this is what I would like to display on the dashboard instead of having it in the “Notifications” area on the left side of the HA), showing the number of missed calls,
… it tells :
- the phone number calling at the moment it is calling
- then when finished, the phone number who called and when
alias: Nouvelle automatisation
description: ""
triggers:
- entity_id: sensor.fritz_box_7530_ax_call_monitor_repertoire_telephonique
to: ringing
trigger: state
conditions: []
actions:
- data:
message: >-
Un appel est actuellement émis de
{{state_attr("sensor.fritz_box_7530_ax_call_monitor_repertoire_telephonique",
"from")}}
action: persistent_notification.create
- target:
entity_id: input_text.dernier_appelant_fritzbox
data:
value: >-
{{
state_attr("sensor.fritz_box_7530_ax_call_monitor_repertoire_telephonique",
"from")}}
action: input_text.set_value
- wait_for_trigger:
- entity_id: sensor.fritz_box_7530_ax_call_monitor_repertoire_telephonique
from: ringing
to: idle
trigger: state
- data:
message: >-
Appel manqué ou raccroché de {{
states("counter.nombre_d_appels_manques") }} + {{
states("input_text.dernier_appelant_fritzbox") }} +
{{state_attr("sensor.fritz_box_7530_ax_call_monitor_repertoire_telephonique",
"from")}} "- Nombre d'appels manqués ou raccrochés :" {{
states("counter.nombre_d_appels_manques") }}
action: persistent_notification.create
- metadata: {}
data: {}
target:
entity_id: counter.nombre_d_appels_manques
action: counter.increment
mode: single
Here is how it looks in the persistent notification area (here with 2 calls coming from the same number) :
… so now I want to display the missed calls (numbers who called, timestamp and phone number who called) on my dashboard, but here is all I was able to do :
- type: custom:mushroom-template-card
primary: |-
{% if states('counter.nombre_d_appels_manques') | int > 0 %}
{{ states("counter.nombre_d_appels_manques") }} appels manqués
{% else %}
Pas d'appels manqués
{% endif %}
secondary: ''
icon: mdi:phone-missed
entity: counter.nombre_d_appels_manques
icon_color: yellow
badge_icon: ''
tap_action:
action: call-service
service: counter.set_value
target:
entity_id:
- counter.nombre_d_appels_manques
data:
value: 0
fill_container: true
card_mod:
style: |
ha-card {
background: grey;
border: 0px;
}
- type: custom:multiple-logbook-card
entities:
- entity: input_text.dernier_appelant_fritzbox
the first is a mushroom template card showing the number of missed calls. When I tap on it, it just restes the number of missed calls (that was my first attempt)
the second below is a “Multiple-logbook-card” showing the entities which is in fact the last number who called … but as you can see the format is not noce, and I can not delete its content when acknowledged …
I though that would be easy, but can not find any way of achieving it
;-(
If anyone can help, many thanks !