How can I read the Fritzbox Switch temperature

How can I read the Fritzbox switch temperature and power ?

The switch is integrated and is working well.
switch:

  • platform: fritzdect
    host: 192.168.178.1
    username: “user”
    password: “pass”

In the switch overview I see the temperature and the power:

grafik

The configuration.yaml look like this:
sensor:

  • platform: template
    sensors:
    room_temp:
    value_template: “{{ states.switch.steckdose_1.attributes.temperature }}”
    name: ‘Fritz Switch Temp’
    unit_of_measurement: ‘°C’

grafik

But this configuration is invalid:

invalid config for [sensor.template]: [name] is an invalid option for [sensor.template]. Check: sensor.template->sensors->gallerie_temp->name. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.template/

Where is my mistake?

Doesn’t look like you looked too hard:

Same question for me after having read the cited page. What entries are required, and how? in configuration.yaml to not only retrieve sensor state, but also its temperature.

1 Like

euh yes is hard
do not understand
please explane
now I got:

#wasmachine temp
- platform: temperature_unit
  name: "temp_wasmachine"
  wz_temp:
  value_template: '{{ states.switch.verliching_1.attributes.Temperature }}'
  friendly_name: 'Temperatuur wasmachine'

It’s in a sensor.yaml file