Newer
Older
homeassistant_config / template / speedtest.yaml
- sensor:
    - name: Speedtest Ping
      state: '{{ ((state_attr("sensor.speedtest_data", "ping").latency | float )) | round(2) }}'
      unit_of_measurement: ms
      state_class: measurement

    - name: Speedtest Download Ping
      state: '{{ ((state_attr("sensor.speedtest_data", "download").latency.iqm | float )) | round(2) }}'
      unit_of_measurement: ms
      state_class: measurement

    - name: Speedtest Upload Ping
      state: '{{ ((state_attr("sensor.speedtest_data", "upload").latency.iqm | float )) | round(2) }}'
      unit_of_measurement: ms
      state_class: measurement

    - name: Speedtest Download
      state: '{{ ((state_attr("sensor.speedtest_data", "download").bandwidth | int ) * 8 / 1000000) | round(2) }}'
      unit_of_measurement: Mbit/s
      state_class: measurement

    - name: Speedtest Upload
      state: '{{ ((state_attr("sensor.speedtest_data", "upload").bandwidth | int ) * 8 / 1000000) | round(2) }}'
      unit_of_measurement: Mbit/s
      state_class: measurement