Skip to content

Commit 2b6619b

Browse files
committed
Merge branch 'develop' into feat/fan-club-discount
2 parents 7c64ef1 + 0d93ce2 commit 2b6619b

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

.husky/prepare-commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
exec < /dev/tty && npx cz --hook || true
1+
# exec < /dev/tty && npx cz --hook || true

_docs/faq.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,19 @@ Cost sensors are calculated by multiplying the consumption by the rate for each
182182

183183
Each half hour block has it's consumption rounded to the nearest 0.01kwh before multiplying by the rate, which is rounded to the nearest penny. The rounding method used is rounding half to even, where numbers ending in 5 are rounded up or down, towards the nearest even hundredth decimal place. As a result, 0.015 would be rounded up to 0.02, while 0.025 is rounded down to 0.02. This is based on [Octopus Energy API documentation](https://developer.octopus.energy/rest/guides/endpoints)
184184

185+
## I'm having issues with a sensor. Is there any way I can see the attributes for a certain point in time?
186+
187+
The majority of attributes for entities are stored in the database for a short amount of time (default is around 10 days). Unfortunately, the only way of obtaining historic attributes is via the database. This can be done via the [SQLite Web Add-On](https://my.home-assistant.io/redirect/supervisor_addon/?addon=a0d7b954_sqlite-web), where the following SQL query can be executed. You'll need to change the target entity id from `binary_sensor.octopus_energy_xxx_intelligent_dispatching` to the one you want to target.
188+
189+
```
190+
SELECT states_meta.entity_id, states.state, state_attributes.shared_attrs, DATETIME(last_changed_ts, 'unixepoch'), DATETIME(last_updated_ts, 'unixepoch')
191+
FROM "states"
192+
join state_attributes on states.attributes_id = state_attributes.attributes_id
193+
join states_meta on states_meta.metadata_id = states.metadata_id
194+
where states_meta.entity_id = 'binary_sensor.octopus_energy_xxx_intelligent_dispatching'
195+
order by last_updated_ts desc
196+
```
197+
185198
## Do you support older versions of the integration?
186199

187200
Due to time constraints, I will only ever support the latest version of the integration. If you have an issue with an older version of the integration, my initial answer will always be to update to the latest version. This might be different to what HACS is reporting if you are not on the minimum supported Home Assistant version (which is highlighted in each release's changelog).

_docs/repairs/no_active_tariff.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
If you receive this repair notice it means that no active tariff was found for one or more of your meters. There are a few reasons why this might be the case.
44

55
1. You are in the middle of switching tariffs. There can sometimes be a gap in your tariff information coming through when your existing tariff ends and your new tariff begins.
6-
2. You are new to OE and your tariff hasn't begun yet. Once your tariff starts, the integration will pick it up and should start working.
7-
3. There is a configuration issue with your account. In this scenario, you'll need to contact Octopus Energy support to get this rectified.
6+
2. You have had a meter swap. When your meter is replaced, it can take time for systems to fully update, leaving a gap in tariff information until this is complete.
7+
3. You are new to OE and your tariff hasn't begun yet. Once your tariff starts, the integration will pick it up and should start working.
8+
4. There is a configuration issue with your account. In this scenario, you'll need to contact Octopus Energy support to get this rectified.
89

9-
All of the above scenarios can be confirmed within your [diagnostic data](../faq.md#ive-been-asked-for-my-meter-information-in-a-bug-request-how-do-i-obtain-this). This will contain your account data including your meters. Under each of your meters, you'll have a list of tariff agreements. For each meter, you should have an agreement with a start date in the past and an end date either in the future or with no end date.
10+
All of the above scenarios can be confirmed within your [diagnostic data](../faq.md#ive-been-asked-for-my-meter-information-in-a-bug-request-how-do-i-obtain-this). This will contain your account data including your meters. Under each of your meters, you'll have a list of tariff agreements. For each meter, you should have an agreement with a start date in the past and an end date either in the future or with no end date.

custom_components/octopus_energy/electricity/previous_accumulative_cost_override.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ async def async_update(self):
130130
self._standing_charge is None or
131131
self._rates[0]["start"] != period_from or
132132
self._rates[-1]["end"] != period_to or
133-
self._standing_charge[0]["start"] != period_from or
134-
self._standing_charge[-1]["end"] != period_to):
133+
self._standing_charge["start"] != period_from or
134+
self._standing_charge["end"] != period_to):
135135

136136
_LOGGER.debug(f"Retrieving rates and standing charge overrides for '{self._mpan}/{self._serial_number}' ({period_from} - {period_to})...")
137137
[rate_data, standing_charge] = await asyncio.gather(

custom_components/octopus_energy/gas/previous_accumulative_cost_override.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ async def async_update(self):
131131
self._standing_charge is None or
132132
self._rates[0]["start"] != period_from or
133133
self._rates[-1]["end"] != period_to or
134-
self._standing_charge[0]["start"] != period_from or
135-
self._standing_charge[-1]["end"] != period_to):
134+
self._standing_charge["start"] != period_from or
135+
self._standing_charge["end"] != period_to):
136136

137137
_LOGGER.debug(f"Retrieving rates and standing charge overrides for '{self._mprn}/{self._serial_number}' ({period_from} - {period_to})...")
138138
[rate_data, standing_charge] = await asyncio.gather(

0 commit comments

Comments
 (0)