-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
179 additions
and
137 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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,76 @@ | ||
# Home Assistant Octopus Energy Docs | ||
|
||
- [Home Assistant Octopus Energy Docs](#home-assistant-octopus-energy-docs) | ||
- [How to setup](#how-to-setup) | ||
- [Sensors](#sensors) | ||
- [Electricity Sensors](#electricity-sensors) | ||
- [Gas Sensors](#gas-sensors) | ||
- [Home Mini](#home-mini) | ||
- [Intelligent](#intelligent) | ||
- [Saving Sessions](#saving-sessions) | ||
- [Target Rate Sensors](#target-rate-sensors) | ||
- [Events](#events) | ||
- [Energy Dashboard](#energy-dashboard) | ||
- [Community Contributions](#community-contributions) | ||
- [FAQ](#faq) | ||
|
||
|
||
## How to setup | ||
|
||
Please follow the [setup guide](./setup_account.md) to setup your initial account. This guide details the configuration, along with the sensors that will be available to you. | ||
|
||
## Sensors | ||
|
||
### Electricity Sensors | ||
|
||
A full list of electricity sensors can be found [here](./sensors/electricity.md). | ||
|
||
### Gas Sensors | ||
|
||
A full list of gas sensors can be found [here](./sensors/gas.md). | ||
|
||
### Home Mini | ||
|
||
If you are lucky enough to own an [Octopus Home Mini](https://octopus.energy/blog/octopus-home-mini/), you can now receive this data within Home Assistant. When setting up (or editing) your account within Home Assistant, you will need to check the box next to `I have a Home Mini`. This will gain the following sensors which can be added to the [energy dashboard](https://www.home-assistant.io/blog/2021/08/04/home-energy-management/): | ||
|
||
> Please note, you will only have the same data exposed in the integration that is available within the app. There has been reports of gas not appearing within the app (and integration) straight away, so you might have to wait a few days for this to appear. Once it's available within the app, if you reload the integration (or restart Home Assistant) then the sensors should become available. | ||
For electricity sensors, see [here](./sensors/electricity.md#home-mini-sensors). | ||
|
||
For gas sensors, see [here](./sensors/gas.md#home-mini-sensors) | ||
|
||
### Intelligent | ||
|
||
If you are on the [intelligent tariff](https://octopus.energy/smart/intelligent-octopus/), then you'll get a few additional sensors when you install the integration. | ||
|
||
A full list of intelligent sensors can be found [here](./sensors/intelligent.md) | ||
|
||
> Please note: If you switch to the intelligent tariff after you have installed the integration, you will need to reload the integration or restart your Home Assistant instance. | ||
### Saving Sessions | ||
|
||
To support Octopus Energy's [saving sessions](https://octopus.energy/saving-sessions/). A full list of sensors can be found [here](./sensors/saving_sessions.md). | ||
|
||
## Target Rate Sensors | ||
|
||
These sensors calculate the lowest continuous or intermittent rates **within a 24 hour period** and turn on when these periods are active. If you are targeting an export meter, then the sensors will calculate the highest continuous or intermittent rates **within a 24 hour period** and turn on when these periods are active. | ||
|
||
These sensors can then be used in automations to turn on/off devices that save you (and the planet) energy and money. You can go through this flow as many times as you need target rate sensors. | ||
|
||
Please follow the [setup guide](./setup_target_rate.md) to setup. | ||
|
||
## Events | ||
|
||
This integration raises several events, which can be used for various tasks like automations. For more information, please see the [events docs](./events.md). | ||
|
||
## Energy Dashboard | ||
|
||
The core sensors have been designed to work with the energy dashboard. Please see the [guide](./energy_dashboard.md) for instructions on how to set this up. | ||
|
||
## Community Contributions | ||
|
||
A collection of community contributions can be found [here](./community.md). | ||
|
||
## FAQ | ||
|
||
Before raising anything, please read through the [faq](./faq.md). If you have questions, then you can raise a [discussion](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/discussions). If you have found a bug or have a feature request please [raise it](https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues) using the appropriate report template. |
This file contains 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
This file contains 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
This file contains 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,82 @@ | ||
# Services | ||
|
||
- [Services](#services) | ||
|
||
There are a few services available within this integration, which are detailed here. | ||
|
||
## Service octopus_energy.purge_invalid_external_statistic_ids | ||
|
||
Service for removing all external statistics that are associated with meters that don't have an active tariff. This is useful if you've been using the integration and obtained new smart meters. | ||
|
||
## Service octopus_energy.refresh_previous_consumption_data | ||
|
||
Service for refreshing the consumption/cost information for a given previous consumption entity. This is useful when you've just installed the integration and want old data brought in or a previous consumption sensor fails to import (e.g. data becomes available outside of the configured offset). The service will raise a notification when the refreshing starts and finishes. | ||
|
||
This service is only available for the following sensors | ||
|
||
- `sensor.octopus_energy_electricity_{{METER_SERIAL_NUMBER}}_{{MPAN_NUMBER}}_previous_accumulative_consumption` | ||
- `sensor.octopus_energy_gas_{{METER_SERIAL_NUMBER}}_{{MPRN_NUMBER}}_previous_accumulative_consumption` | ||
|
||
## Service octopus_energy.update_target_config | ||
|
||
Service 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). | ||
|
||
> Please note 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 | | ||
| `data.target_hours` | `yes` | The optional number of hours the target rate sensor should come on during a 24 hour period. Must be divisible by 0.5. | | ||
| `data.target_start_time` | `yes` | The optional time the evaluation period should start. Must be in the format of `HH:MM`. | | ||
| `data.target_end_time` | `yes` | The optional time the evaluation period should end. Must be in the format of `HH:MM`. | | ||
| `data.target_offset` | `yes` | The optional offset to apply to the target rate when it starts. Must be in the format `(+/-)HH:MM:SS` | | ||
|
||
This can be used via automations in the following way. Assuming we have the following inputs. | ||
|
||
```yaml | ||
input_number: | ||
octopus_energy_target_hours: | ||
name: Octopus Energy Target Hours | ||
min: 0 | ||
max: 24 | ||
|
||
input_text: | ||
# From/to would ideally use input_datetime, but we need the time in a different format | ||
octopus_energy_target_from: | ||
name: Octopus Energy Target From | ||
initial: "00:00" | ||
octopus_energy_target_to: | ||
name: Octopus Energy Target To | ||
initial: "00:00" | ||
octopus_energy_target_offset: | ||
name: Octopus Energy Target Offset | ||
initial: "-00:00:00" | ||
``` | ||
Then an automation might look like the following | ||
```yaml | ||
automations: | ||
- alias: Update target rate config | ||
trigger: | ||
- platform: state | ||
entity_id: | ||
- input_number.octopus_energy_target_hours | ||
- input_text.octopus_energy_target_from | ||
- input_text.octopus_energy_target_to | ||
- input_text.octopus_energy_target_offset | ||
condition: [] | ||
action: | ||
- service: octopus_energy.update_target_config | ||
data: | ||
target_hours: > | ||
"{{ states('input_number.octopus_energy_target_hours') | string }}" | ||
target_start_time: > | ||
{{ states('input_text.octopus_energy_target_from') }} | ||
target_end_time: > | ||
{{ states('input_text.octopus_energy_target_to') }} | ||
target_offset: > | ||
{{ states('input_text.octopus_energy_target_offset') }} | ||
target: | ||
entity_id: binary_sensor.octopus_energy_target_example | ||
``` |
This file contains 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
Oops, something went wrong.