Hallo,
ich hoffe mal, mein Beitrag passt hier hin. Die Grundidee ist, eine Automation so zu verändern, dass über eine für FAX festgelegte Nummer alle eingehenden bzw. ausgehenden Rufe als „FAX“ gefiltert werden. Anschließend würde ich gerne die eingehenden, ausgehenden bzw. Fax-Rufe separat auf dem Dasboard anzeigen lassen. Meine bescheidenen Testmöglichkeiten haben ergeben, dass es so funktioniert könnte. Allerdings ist es mir noch nicht gelungen, diesen Schritt zu realisieren.
Was sagen die hier anwesenden Experten dazu und wäre das ein Verbesserungsvorschlag an dem man sich beteiligen könnte?
Viele Grüße
Hier mein bisheriger Code
alias: Telefon Anrufliste_v2
triggers:
- entity_id:
- sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch
id: "1"
from: dialing
to: talking
alias: ausgehend
trigger: state
- alias: klingelt
entity_id:
- sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch
id: "2"
to: ringing
for:
hours: 0
minutes: 0
seconds: 2
trigger: state
- entity_id:
- sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch
id: "3"
from: ringing
to: talking
alias: ankommend
trigger: state
- entity_id:
- sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch
id: "4"
from: ringing
to: idle
alias: verpasst
trigger: state
conditions:
- condition: or
conditions:
- condition: trigger
id:
- "1"
- "2"
- "5"
- "6"
- "7"
- "8"
- condition: and
conditions:
- condition: trigger
id:
- "3"
- "4"
- condition: state
entity_id: input_boolean.telefon_klingelt
state: "on"
actions:
- alias: Fax Anruf erkennen
if:
- condition: or
conditions:
- condition: template
value_template: >-
{{ '01234567890' in
state_attr('sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch',
'from') }}
- condition: template
value_template: >-
{{ '01234567890' in
state_attr('sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch',
'to') }}
then:
- data:
value: >-
<font color="#8E44AD"><ha-icon icon="mdi:fax"></ha-icon></font>
Fax-Anruf von/zu Nummer 01234567890
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
- alias: Ausgehend
if:
- condition: trigger
id: "1"
then:
- data:
value: >-
<font color="#8BBF68"><ha-icon icon="mdi:phone-outgoing">
</ha-icon></font> Gespräch mit
{{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch","with")}}
{% if
(state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name") != "unknown")
%}({{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name")}}){% endif %}
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
- alias: Ausgehend
if:
- condition: trigger
id: "1"
then:
- data:
value: >-
<font color="#8BBF68"><ha-icon icon="mdi:phone-outgoing">
</ha-icon></font> Gespräch mit
{{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch","with")}}
{% if
(state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name") != "unknown")
%}({{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name")}}){% endif %}
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
- alias: Klingelt
if:
- condition: trigger
id:
- "2"
then:
- metadata: {}
data: {}
target:
entity_id: input_boolean.telefon_klingelt
action: input_boolean.turn_on
- data:
value: >-
{{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch","from")}}
{% if
(state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"from_name") != "unknown")
%}({{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"from_name")}}){% endif %}
target:
entity_id: input_text.telefon_anrufer
action: input_text.set_value
- alias: "V1: Ankommend (ohne Geschäftszeiten)"
if:
- condition: trigger
id:
- "3"
then:
- data:
value: >-
<font color="#268DDA"><ha-icon icon="mdi:phone-incoming">
</ha-icon></font> Anruf von
{{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch","with")}}
{% if
(state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name") != "unknown")
%}({{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name")}}){% endif %}
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
- metadata: {}
data: {}
target:
entity_id: input_boolean.telefon_klingelt
action: input_boolean.turn_off
enabled: true
- alias: "V2: Ankommend (innerhalb Geschäftszeiten)"
if:
- condition: trigger
id:
- "3"
- condition: or
conditions:
- condition: time
after: "08:00:00"
before: "18:30:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: time
after: "08:00:00"
before: "13:30:00"
weekday:
- sat
then:
- data:
value: >-
<font color="#268DDA"><ha-icon icon="mdi:phone-incoming">
</ha-icon></font> Anruf von
{{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch","with")}}
{% if
(state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name") != "unknown")
%}({{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name")}}){% endif %}
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
- metadata: {}
data: {}
target:
entity_id: input_boolean.telefon_klingelt
action: input_boolean.turn_off
enabled: false
- alias: "V2: AB (außerhalb Geschäftszeiten)"
if:
- condition: trigger
id:
- "3"
- condition: or
conditions:
- condition: time
after: "18:30:00"
before: "08:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: time
after: "13:30:00"
before: "08:00:00"
weekday:
- sat
- condition: time
weekday:
- sun
then:
- data:
value: >-
<font color="#E3603B"><ha-icon icon="mdi:phone-lock">
</ha-icon></font> Anruf auf AB von
{{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch","with")}}
{% if
(state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name") != "unknown")
%}({{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"with_name")}}){% endif %}
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
- metadata: {}
data: {}
target:
entity_id: input_boolean.telefon_klingelt
action: input_boolean.turn_off
enabled: false
- alias: Verpasst
if:
- condition: trigger
id:
- "4"
then:
- data:
value: >-
<font color="#E3603B"><ha-icon icon="mdi:phone-missed">
</ha-icon></font> Verpasster Anruf von
{{states("input_text.telefon_anrufer")}}
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
- metadata: {}
data: {}
target:
entity_id: input_boolean.telefon_klingelt
action: input_boolean.turn_off
- alias: AB nach X Sekunden
if:
- condition: trigger
id:
- "5"
then:
- data:
value: >-
<font color="#268DDA"><ha-icon icon="mdi:phone-message">
</ha-icon></font> Anruf auf AB von
{{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch","from")}}
{% if
(state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"from_name") != "unknown")
%}({{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"from_name")}}){% endif %}
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
- metadata: {}
data: {}
target:
entity_id: input_boolean.telefon_klingelt
action: input_boolean.turn_off
- alias: Feed bereinigen
if:
- condition: trigger
id:
- "6"
then:
- data:
value: unknown
target:
entity_id:
- input_text.telefon_feed
action: input_text.set_value
- alias: wählen
if:
- condition: trigger
id:
- "7"
then:
- data:
value: >-
{{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch","to")}}
{% if
(state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"to_name") != "unknown")
%}({{state_attr("sensor.fritz_box_6591_cable_anrufmonitor_telefonbuch",
"to_name")}}){% endif %}
target:
entity_id: input_text.telefon_anrufer
action: input_text.set_value
- alias: nicht angenommen
if:
- condition: trigger
id:
- "8"
then:
- data:
value: >-
<font color="#E3603B"><ha-icon icon="mdi:phone-remove">
</ha-icon></font> Nicht angenommenes Telefonat mit
{{states("input_text.telefon_anrufer")}}
target:
entity_id: input_text.telefon_feed
action: input_text.set_value
mode: single
trace:
stored_traces: 15