Newer
Older
homeassistant_config / template / speedtest.yaml
@root root on 30 Aug 2022 636 bytes Initial commit
- 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
      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