New Filter

I added a filter for my speed test thinking I would see a smoothed line for speedtest as well as the raw data. But I’m only getting the jagged line:
Capture

The yaml for this is:

# Speedtest
  - platform: speedtest
    minute:
      - 0
      - 30
    monitored_conditions:
      - ping
      - download
      - upload

# Speedtest Download Sensor Filter
  - platform: filter
    name: "Speedtest Download Filtered"
    entity_id: sensor.speedtest_download
    filters:
      - filter: lowpass
        time_constant: 10
        precision: 2

from my configuration.yaml file.

The ‘normal’ sensor looks like this:
Capture1

thoughts?

so increase the time constant? I’ll give that a go

Yes, try covering a couple of readings

so you are saying DECREASE the time constant? Still not sure why I’m only seeing one line though… I thought it was supposed to show both smoothed and unsmoothed?

The docs show both filtered and unfiltered on the one graph.

I don’t understand. Time constant 10 covers 5 hours (10 lots of 30 minutes) and should be smoother I would have expected…

Oh yes, that’s my graph, forgot about that. @dgomes and I will work on the docs

1 Like

nice… so If I want a best fit curve for that as shown, do you have a suggested value to try? Also would be great if it did show both lines…

I’m on phone so can’t calculate, try a couple of different values - you can plot multiple traces on a single graph and compare performance.
Docs to come :+1:

how?

Great. That might explain it.

https://home-assistant.io/components/history_graph/
Just config multiple entities

So this will display as a different sensor in the frontend?

I entered this:

# Graph Speedtest Download Filtered and Unfiltered
history_graph:
  gr1:
    name: Speedtest Download Graph
    entities:
      - sensor.speedtest_download
      - sensor.speedtest_download_filtered
    hours_to_show: 120

and get a config validation error:
Sun Mar 11 2018 14:05:33 GMT+1100 (Local Daylight Time)

starting version 3.2.4
Testing configuration at /config
ERROR:homeassistant.util.yaml:while parsing a block mapping
in “/config/configuration.yaml”, line 143, column 3
expected , but found ‘-’
in “/config/configuration.yaml”, line 151, column 3
Failed config
General Errors:
- while parsing a block mapping
in “/config/configuration.yaml”, line 143, column 3
expected , but found ‘-’
in “/config/configuration.yaml”, line 151, column 3
Successful config (partial)

Line 143 is the gr1: line…

UGH NVM I screwed up by plonking it in the middle of some sensors. Doh!

OK Nice. I ended up using 20 and it’s a better representation of the speed. Cool.

1 Like