-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Add compensation integration #15192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add compensation integration #15192
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7a60c0c
Add compensation integration
Petro31 4c80a3f
Update source/_integrations/compensation.markdown
Petro31 d5a260c
Update source/_integrations/compensation.markdown
Petro31 cb66ed5
Update source/_integrations/compensation.markdown
Petro31 504a850
Update source/_integrations/compensation.markdown
Petro31 5b4cb8c
ADR-0007 & Review Fixes
Petro31 fb4032d
Merge branch 'add-compensation-int' into next
Petro31 452a046
Add MatthewFlamm Clarification
Petro31 48c17b5
Changed based on review for integration
Petro31 52a6cb9
Tweak
frenck 08d8103
Update compensation.markdown
Petro31 ab29197
Bump version
frenck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| --- | ||
| title: Compensation | ||
| description: Instructions on how to integrate compensation sensors into Home Assistant. | ||
| ha_category: | ||
| - Utility | ||
| - Sensor | ||
| ha_iot_class: Calculated | ||
| ha_release: '0.117' | ||
| ha_quality_scale: internal | ||
| ha_codeowners: | ||
| - '@petro31' | ||
| ha_domain: compensation | ||
| --- | ||
|
|
||
| The Compensation integration consumes the state from other sensors. It exports the compensated value as state and the following values as attributes: `entity_id` and `coefficients`. A single polynomial, linear by default, is fit to all data points provided. | ||
|
|
||
| ## Configuration | ||
|
|
||
| To enable the compensation sensor, add the following lines to your `configuration.yaml`: | ||
|
|
||
| ```yaml | ||
| # Example configuration.yaml entry | ||
| compensation: | ||
| media_player_db_volume: | ||
| entity_id: media_player.yamaha_receiver | ||
| data_points: | ||
| - [0.2, -80.0] | ||
| - [1.0, 0.0] | ||
| ``` | ||
|
|
||
| {% configuration %} | ||
| entity_id: | ||
| description: The entity to monitor. | ||
| required: true | ||
| type: string | ||
| data_points: | ||
| description: "The collection of data point conversions with the format `[uncompensated_value, compensated_value]`. e.g., `[1.0, 2.1]`. The number of required data points is equal to the polynomial `degree` + 1. For example, a linear compensation (with `degree: 1`) requires at least 2 data points." | ||
| required: true | ||
| type: list | ||
| name: | ||
| description: Name of the sensor to use in the frontend. | ||
| required: false | ||
| default: Compensation | ||
| type: string | ||
| attribute: | ||
| description: Attribute to monitor. | ||
| required: false | ||
| type: string | ||
| degree: | ||
| description: "The degree of a polynomial. e.g., Linear compensation (y = x + 3) has 1 degree, Quadratic compensation (y = x<sup>2</sup> + x + 3) has 2 degrees, etc." | ||
| required: false | ||
| default: 1 | ||
| type: integer | ||
| precision: | ||
| description: Defines the precision of the calculated values, through the argument of round(). | ||
| required: false | ||
| default: 2 | ||
| type: integer | ||
| unit_of_measurement: | ||
| description: Defines the units of measurement of the sensor, if any. | ||
| required: false | ||
| type: string | ||
| {% endconfiguration %} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.