Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVM FRITZ!Box Call Monitor Example YAML Code fail #36362

Closed
ErnstHKStelzer opened this issue Dec 15, 2024 · 8 comments
Closed

AVM FRITZ!Box Call Monitor Example YAML Code fail #36362

ErnstHKStelzer opened this issue Dec 15, 2024 · 8 comments

Comments

@ErnstHKStelzer
Copy link

Feedback

The example cannot be used. Complains about data. Message malformed: extra keys not allowed @ data['automation']. I know that some changes were made to YAML orders and namings but I assume you will see the issues immediately. Sorry for not being helpful.

URL

https://www.home-assistant.io/integrations/fritzbox_callmonitor/

Version

2024.12.3

Additional information

No response

@home-assistant
Copy link

Hey there @cdce8p, mind taking a look at this feedback as it has been labeled with an integration (fritzbox_callmonitor) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of fritzbox_callmonitor can trigger bot actions by commenting:

  • @home-assistant close Closes the feedback.
  • @home-assistant rename Awesome new title Renames the feedback.
  • @home-assistant reopen Reopen the feedback.
  • @home-assistant unassign fritzbox_callmonitor Removes the current integration label and assignees on the feedback, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information) to the feedback.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information) on the feedback.

@cdce8p
Copy link
Member

cdce8p commented Dec 16, 2024

Hey @ErnstHKStelzer, thanks for the issue. Are you sure about it? I just added the example form the docs to my test instance and it seems to work fine.

Could you double check, especially if the indentation is correct? Note also that you'll need to remove automation: if you're inserting it directly into automations.yaml.

@ErnstHKStelzer
Copy link
Author

Hey @cdce8p, thank you very much for your quick response. At least I have a version that I can save. I will respond in more detail by Thursday. I am currently traveling.

@ErnstHKStelzer
Copy link
Author

@cdce8p As you suggested, I made a mistake and have to remove Automation:. I try to avoid the automation.yaml file and use Automations & scenes instead. Nevertheless, could you add a reference to the documentation on from_name, ... ? I also added a variable, but I failed to have a single sensor.fritz_..._call_monitor_telefonbuch, instead of the current two. I usually keep my documents & comments with code but comments are removed.

alias: FRITZ!Phone Status
description: AVM FRITZ!Phone Status V1.1
triggers:
  - trigger: state
    entity_id: sensor.fritz_box_7590_ax_call_monitor_telefonbuch
conditions: []
actions:
  - action: notify.mobile_app_ernst_iphone_16_pro
    metadata: {}
    data:
      title: Phone
      message: |-
        {% if is_state(sensorphone, "idle") %}
          Phone is idle
        {% elif is_state(sensorphone, "dialing") %}
          Calling {{ state_attr(sensorphone, 'to_name') }} ({{ state_attr(sensorphone, 'to') }})
        {% elif is_state(sensorphone, "ringing") %}
          Incoming call from {{ state_attr(sensorphone, 'from_name') }} ({{ state_attr(sensorphone, 'from') }})
        {% else %}
          Talking to {{ state_attr(sensorphone, 'with_name') }} ({{ state_attr(sensorphone, 'with') }})
        {% endif %}
variables:
  sensorphone: sensor.fritz_box_7590_ax_call_monitor_telefonbuch
mode: single

@cdce8p
Copy link
Member

cdce8p commented Dec 20, 2024

Nevertheless, could you add a reference to the documentation on from_name, ... ?

Could you explain in a bit more detail what exactly it is you'd like me to do? from_name is already included in the docs example.

@ErnstHKStelzer
Copy link
Author

@cdce8p I understand that the set of available attributes varies according to the phone's status. This can be followed in the Developer Tools States. I assume that the attributes and their values are documented by AVM. If that is the case it might be useful to indicate where this documentation can be found. If not, as you point out, your docs example contains all the required and available information.

@ErnstHKStelzer
Copy link
Author

@cdce8p I also found a workaround that uses the variable sensorphone.

...
triggers:
  - value_template: "{{ states(sensorphone) }}"
    trigger: template
conditions: []
...

@cdce8p
Copy link
Member

cdce8p commented Dec 21, 2024

I assume that the attributes and their values are documented by AVM.

This is the official AVM site for their dev docs: https://avm.de/service/schnittstellen/
However, I couldn't find it there. The library documentation is actually more helpful but I don't think it should be part of the Home Assistant docs. https://fritzconnection.readthedocs.io/en/1.14.0/sources/call_monitoring.html

Anyway, going to mark this issue as resolved now then.

@cdce8p cdce8p closed this as completed Dec 21, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants