diff --git a/_docs/services.md b/_docs/services.md index fa0ab103..c13caec6 100644 --- a/_docs/services.md +++ b/_docs/services.md @@ -19,10 +19,6 @@ This service is only available for the following sensors For updating a given [target rate's](./setup/target_rate.md) config. This allows you to change target rates sensors dynamically based on other outside criteria (e.g. you need to adjust the target hours to top up home batteries). -!!! info - - This is temporary and will not persist between restarts. - | Attribute | Optional | Description | | ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------- | | `target.entity_id` | `no` | The name of the target sensor whose configuration is to be updated. | @@ -91,10 +87,6 @@ action: For updating a given [rolling target rate's](./setup/rolling_target_rate.md) config. This allows you to change rolling target rates sensors dynamically based on other outside criteria (e.g. you need to adjust the target hours to top up home batteries). -!!! info - - This is temporary and will not persist between restarts. - | Attribute | Optional | Description | | ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------- | | `target.entity_id` | `no` | The name of the target sensor whose configuration is to be updated. | diff --git a/custom_components/octopus_energy/intelligent/charge_target.py b/custom_components/octopus_energy/intelligent/charge_target.py index 400008b4..65d86d3f 100644 --- a/custom_components/octopus_energy/intelligent/charge_target.py +++ b/custom_components/octopus_energy/intelligent/charge_target.py @@ -39,7 +39,7 @@ def __init__(self, hass: HomeAssistant, coordinator, client: OctopusEnergyApiCli self._attr_native_min_value = 10 self._attr_native_max_value = 100 - self._attr_native_step = 5 + self._attr_native_step = 1 self._attr_mode = NumberMode.BOX @property @@ -101,7 +101,7 @@ async def async_set_native_value(self, value: float) -> None: self._last_updated = utcnow() self.async_write_ha_state() else: - raise Exception(f"Value must be between {self._attr_native_min_value} and {self._attr_native_max_value} and be a multiple of 5") + raise Exception(f"Value must be between {self._attr_native_min_value} and {self._attr_native_max_value} and be a multiple of {self._attr_native_step}") async def async_added_to_hass(self) -> None: """Restore last state.""" diff --git a/custom_components/octopus_energy/services.yaml b/custom_components/octopus_energy/services.yaml index ad8c6ca5..726111bb 100644 --- a/custom_components/octopus_energy/services.yaml +++ b/custom_components/octopus_energy/services.yaml @@ -59,7 +59,7 @@ update_target_config: update_rolling_target_config: name: Update rolling target rate config - description: Updates a given rolling target rate's config. Please note this is temporary and will not persist between restarts. + description: Updates a given rolling target rate's config. target: entity: integration: octopus_energy