Fritz_netmonitor some entities in template are not correctly valorized while attributes are

I was trying to user fritzbox_netmonitor to keep under control the DSL status and the throughput of the line.
So I wrote a piece of configuration to get some parameter from the entity fritz_netmonitor.
Unfortunately some sensor look to work someother haven’t any value.
In my configuration dsl_transmission_rete_up/down show no value (zero) when others looks to works such as external IP.
Attributes of the fritz_netmonitor indeed are correctly valorized.

Any Idea?

Thanks

- platform: fritzbox_netmonitor

- platform: template
  sensors:
    dsl_line_link:
      friendly_name: "DSL Line Link"
      entity_id: sensor.dsl_line_link
      unit_of_measurement: ''
      value_template: "{{ state_attr('sensor.fritz_netmonitor', 'is_linked') }}"
    
    dsl_line_status:
      friendly_name: "DSL Line Status"
      entity_id: sensor.dsl_line_status
      unit_of_measurement: ''
      value_template: "{{ state_attr('sensor.fritz_netmonitor', 'is_connected') }}"
     
    dsl_external_ip:
      friendly_name: "DSL External IP"
      entity_id: sensor.dsl_external_ip
      unit_of_measurement: ''
      value_template: "{{ state_attr('sensor.fritz_netmonitor', 'external_ip') }}"
      
    dsl_router_uptime:
      friendly_name: "DSL Router Uptime"
      entity_id: sensor.dsl_router_uptime
      unit_of_measurement: 's'
      value_template: "{{ state_attr('zensor.fritz_netmonitor', 'uptime') }}"
      
    dsl_transmission_rate_up:
      friendly_name: "DSL Transmission rate UP"
      entity_id: sensor.dsl_transmission_rate_up
      unit_of_measurement: 'Mbps'
      value_template: "{{ state_attr('sensor.fritz_netmonitor', 'transmission_rate_up') }}"
      
    dsl_transmission_rate_down:
      friendly_name: "DSL Transmission rate DOWN"
      entity_id: sensor.dsl_transmission_rate_down
      unit_of_measurement: 'Mbps'
      value_template: "{{ state_attr('sensor.fritz_netmonitor', 'transmission_rate_down') }}"

You’re giving all your template sensors their self entity_id to listen to state changes.
Give them all sensor.fritz_netmonitor
Oh, and you have a typo zensor.fritz_netmonitor

@VDRainer

Sorry I didn’t catch what part should be modified. Could you explain me this point better?

Thank You for let me know of the typo…

Take a look at the docs about the entity_id option.

(string | list)(Optional)
A list of entity IDs so the sensor only reacts to state changes of these entities. This can be used if the automatic analysis fails to find all relevant entities.

So if you give your templates their own entity_id, how should they know that the state changed?
Remove the entity_id options. HA’s automatic analysis would be enough for your sensors.

The templates should all work, but the external_ip returns None.

Thank You @VDRainer, It works included the external IP.