Skip to content

Commit

Permalink
Allow non hourly data (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFes authored Oct 5, 2023
1 parent 5acf452 commit 8e71635
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 166 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ In case `hours` is provided, this will overrule the calculated number of hours,

|name|type|default|example|description|
|---|---|---|---|---|
|`no_weight_points`|integer|`1`|`4`|The most important hour in your hour range. Eg if hour device uses most energy in the 2nd hour, you can set this to `2` to give more weight to that energy price|
|`no_weight_points`|integer|`1`|`4`|The number of weight points per hour, eg set to `4` if each weight point represents 15 minutes. This should match with the datapoints per hour, meaning the number of minutes each list item in the sensor represents (normally 60, for dynamic prices per hour) shoudl be divisable by the number of minutes per weight point. So with hourly data you can use `4` or `12` but not `7`|
|`weight`|list|`none`|`[25, 1, 4, 0]`|The list with weight factors to be used for the calculation|
|`program`|string|none|`"Dryer Clothes"`| Description of data used in the energy plot sensor. Adds automatically the correct weight and number of weight points.

Expand Down Expand Up @@ -189,9 +189,11 @@ The macro will display error messages as output in case of incorrect input.
|No valid data in selected sensor|The provided sensor does not have valid data to work with, the sensor might be unavailable, or you need to provide a specific `attr_today` or `attr_tomorrow`|
|Time key not found in data|The time key can not be found in the source data, you might need to proviee a `time_key` parameter|
|Value key not found in data|The value key can not be found in the source data, you might need to provide a `value_key` parameter|
|Boolean input expected for {parameter}|The mentioned parameter expects a boolean input, but something else is provided. You can provice values like `0`, `false`, `"True"` but not `"banana"`|
|Invalid mode selected|An invalid value for the `mode` parameter was provided, check your input|
|Selected program is not available or has no data|The value provided for the `program` parameter can not be found in the sensor, or has no data|
|Data plot for selected program not complete|The data plot for the value in the `program` parameter is incomplete|
|Invalid combination of data points per hour and number of weight points|The number of weight points does not match with the datapoints per hour provided by the sensor. If you eg have quarterly prices, you can't have 6 datapoints per hour, as 15 is not divisable by 10|
|No(t enough) data within current selection|There is no, or not enough data to match your input. This can happen if you eg want a consecutive block of 4 hours, and you only use todays data for future hours, when it's already after 21:00|

# Thanks to
Expand Down
Loading

0 comments on commit 8e71635

Please sign in to comment.