Skip to content

Added Time SMA#4926

Merged
frenck merged 6 commits into
home-assistant:nextfrom
dgomes:filter_time_sma
Mar 18, 2018
Merged

Added Time SMA#4926
frenck merged 6 commits into
home-assistant:nextfrom
dgomes:filter_time_sma

Conversation

@dgomes
Copy link
Copy Markdown
Contributor

@dgomes dgomes commented Mar 16, 2018

Description:

Added Time SMA filter documentation

Pull request in home-assistant (if applicable): home-assistant/core#13104

Checklist:

  • Branch: Fixes, changes and adjustments should be created against current. New documentation for platforms/components and features should go to next.
  • The documentation follow the standards.

@frenck frenck added the new-feature This PR adds documentation for a new Home Assistant feature to an existing integration label Mar 16, 2018
frenck
frenck previously approved these changes Mar 16, 2018
Copy link
Copy Markdown
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @dgomes! Looks great 🥇

Can be merged as soon as the parent PR gets merged.

@@ -56,14 +59,14 @@ filters:
type: map
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From previous PR, but this is not really a map, but rather a list.

footer: true
ha_category: Sensor
ha_release: 0.65
ha_release: 0.66
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, but isn't this variable supposed to say when this was added? I think it's also used in the "Added in ..." sections.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!


The paper defines three types/versions of the Simple Moving Average (SMA): *last*, *next* and *linear*. Currently only *last* is implemented.

Theta, as described in the paper, is the `window_size` parameter, and can be expressed using time notation (e.g., 00:05 for a five minutes time window).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we start adding other types, I think it would be nice to provide a separate configuration.yaml snippet for each filter:, because from the current layout it's quite difficult to find what you're really interested in (especially as a new user). Just a comment and out of scope for this PR of course.

@frenck frenck self-assigned this Mar 18, 2018
@frenck
Copy link
Copy Markdown
Member

frenck commented Mar 18, 2018

Corrected most, build passes, parent PR has been merged in.
I'll go ahead and merge this one in as well.

@frenck frenck merged commit df47398 into home-assistant:next Mar 18, 2018
@dgomes dgomes deleted the filter_time_sma branch May 7, 2018 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature This PR adds documentation for a new Home Assistant feature to an existing integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants