Skip to content

Commit

Permalink
new release (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
BottlecapDave authored Jan 3, 2025
2 parents 8a00aa6 + 416dcf7 commit 917d295
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
8 changes: 0 additions & 8 deletions _docs/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down Expand Up @@ -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. |
Expand Down
4 changes: 2 additions & 2 deletions custom_components/octopus_energy/intelligent/charge_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/octopus_energy/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 917d295

Please sign in to comment.