Skip to content

Commit

Permalink
fix: Fixed issue where target rate sensor could not be reconfigured i…
Browse files Browse the repository at this point in the history
…f min/max rate were set (15 minutes dev time)
  • Loading branch information
BottlecapDave committed Aug 26, 2024
1 parent 30cf6b4 commit e7168e4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _docs/setup/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ When calculating gas costs, a calorific value is included in the calculation. Un

## Pricing Caps

There has been inconsistencies across tariffs on whether government pricing caps are included or not. Therefore the ability to configure pricing caps has been added within you account.
There has been inconsistencies across tariffs on whether government pricing caps are included or not. Therefore the ability to configure pricing caps has been added within you account. This is configured in pounds and pence format (e.g. 0.12 for 12p).

!!! info

Expand Down
2 changes: 1 addition & 1 deletion _docs/setup/target_rate.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ If this is checked, then the normal behaviour of the sensor will be reversed. Th

### Minimum/Maximum Rates

There may be times that you want the target rate sensors to not take into account rates that are above or below a certain value (e.g. you don't want the sensor to turn on when rates go crazy or where it would be more beneficial to export).
There may be times that you want the target rate sensors to not take into account rates that are above or below a certain value (e.g. you don't want the sensor to turn on when rates go crazy or where it would be more beneficial to export). This is configured in pounds and pence format (e.g. 0.12 for 12p).

!!! info

Expand Down
4 changes: 2 additions & 2 deletions custom_components/octopus_energy/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ async def __async_setup_target_rate_schema__(self, config, errors):
CONFIG_TARGET_ROLLING_TARGET: is_rolling_target,
CONFIG_TARGET_LAST_RATES: find_last_rates,
CONFIG_TARGET_INVERT_TARGET_RATES: invert_target_rates,
CONFIG_TARGET_MIN_RATE: config[CONFIG_TARGET_MIN_RATE] if CONFIG_TARGET_MIN_RATE in config else None,
CONFIG_TARGET_MAX_RATE: config[CONFIG_TARGET_MAX_RATE] if CONFIG_TARGET_MAX_RATE in config else None,
CONFIG_TARGET_MIN_RATE: f'{config[CONFIG_TARGET_MIN_RATE]}' if CONFIG_TARGET_MIN_RATE in config else None,
CONFIG_TARGET_MAX_RATE: f'{config[CONFIG_TARGET_MAX_RATE]}' if CONFIG_TARGET_MAX_RATE in config else None,
CONFIG_TARGET_WEIGHTING: config[CONFIG_TARGET_WEIGHTING] if CONFIG_TARGET_WEIGHTING in config else None,
}
),
Expand Down
10 changes: 10 additions & 0 deletions custom_components/octopus_energy/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
"minimum_rate": "The optional minimum rate for target hours",
"maximum_rate": "The optional maximum rate for target hours",
"weighting": "The optional weighting to apply to the discovered rates"
},
"data_description": {
"hours": "This has to be a multiple of 0.5.",
"minimum_rate": "This is in pounds and pence (e.g. 0.12)",
"maximum_rate": "This is in pounds and pence (e.g. 0.12)"
}
},
"target_rate_account": {
Expand Down Expand Up @@ -162,6 +167,11 @@
"minimum_rate": "The optional minimum rate for target hours",
"maximum_rate": "The optional maximum rate for target hours",
"weighting": "The optional weighting to apply to the discovered rates"
},
"data_description": {
"hours": "This has to be a multiple of 0.5.",
"minimum_rate": "This is in pounds and pence (e.g. 0.12)",
"maximum_rate": "This is in pounds and pence (e.g. 0.12)"
}
},
"cost_tracker": {
Expand Down

0 comments on commit e7168e4

Please sign in to comment.