Octopus Energy - Intelligent Tariff

I’ve just bought an EV and the Smart Charger is being installed next week. I’ve just spoken to Octopus Customer Service and they have confirmed that:

  1. There is no problem with the combination of Outgoing Octopus (15p/kWh) and Intelligent Octopus (off peak 7.5p/kWh)
  2. If my Solar Battery System finds my House Batteries are fully charged and I’m therefore exporting excess energy, the EV will be charged using this excess and IO recognises this and does not charge me.

Has anyone had experience of this scenario and most importantly, does it work?

@megakid Is there a way to get the current electricity rate so you can feed this into the energy cost entities to get your actual spend? This seems to be the hardest problem with Intelligent, since moving to this tariff even my IHD is wildly off, it either assumes everything that day is Peak or Off-Peak so it’s either under by a huge amount or over by a huge amount.

Thanks for the integration.

Sharing another dashboard/template idea that uses lovelace-paper-buttons-row and card_mod styling.

type: entities
title: Intelligent Octopus Go
entities:
  - type: custom:paper-buttons-row
    preset: mushroom
    buttons:
      - entity: switch.octopus_smart_charging
        tap_action:
          action: more-info
        hold_action:
          action: none
        state_icons:
          'on': mdi:toggle-switch-outline
          'off': mdi:toggle-switch-off-outline
        state_text:
          'on': Enabled
          'off': Disabled
        layout: icon|state
        styles:
          button:
            font-size: 15px
            width: 28%
        state_styles:
          'off':
            icon:
              color: '#44739e'
      - entity: select.octopus_target_ready_by_time
        layout: icon|state
        state: '{{ states.select.octopus_target_ready_by_time.state }}'
        styles:
          button:
            background-color: transparent
            width: 28%
          icon:
            color: grey
      - entity: select.octopus_target_state_of_charge
        layout: icon|state
        state: '{{ states.select.octopus_target_state_of_charge.state_with_unit }}'
        styles:
          button:
            background-color: transparent
            width: 28%
          icon:
            color: grey
  - type: custom:paper-buttons-row
    preset: mushroom
    buttons:
      - entity: binary_sensor.octopus_intelligent_hasplanneddispatches
        layout: name
        styles:
          button:
            background-color: transparent;
            color: '#ccc;'
        state_styles:
          'off':
            button:
              display: none;
        name: >-
          {% if
          is_state('binary_sensor.octopus_intelligent_hasplanneddispatches',
          'on') %} {% for dispatch in
          state_attr('binary_sensor.octopus_intelligent_slot','plannedDispatches')
          -%}
           {{ (dispatch.startDtUtc | as_datetime | as_local).strftime('%H:%M') }} to {{ (dispatch.endDtUtc | as_datetime | as_local).strftime('%H:%M') -}}
          {% if not loop.last %},{% endif %} {% endfor %} {%- endif 
          %}              
show_header_toggle: false
card_mod:
  style: |
    .card-header {
      color: #9b9b9b;
      font-size: 16px !important;
      font-weight: 500;
      padding-bottom: 2px;
      padding-top: 0px;
    }
    .card-content {
      padding-bottom: 3px;      
      padding-left: 0;
      padding-right: 0;
    }
2 Likes

Another option, if you just wanted delimiter between the slots, using loop.last

{% for dispatch in state_attr('binary_sensor.octopus_intelligent_slot','plannedDispatches') -%}
{{ (dispatch.startDtUtc | as_datetime | as_local).strftime('%H:%M') }} to {{ (dispatch.endDtUtc | as_datetime | as_local).strftime('%H:%M') -}}
{% if not loop.last %}⏰{% endif %}
{% endfor %}

I’m also seeing the error
AttributeError: 'OctopusIntelligentSlot' object has no attribute '_is_on' last posted in the summer. Running HA 2023.11.3 and Octopus Intelligent integration v1.6.2.

Bit of a sod as not having the binary_sensor.octopus_intelligent_slot throws all my automation out. Not sure if there is a way around this. :person_shrugging:

Posted on known issues here: Sensors missing in HA 2023.11.3 with 1.6.2 · Issue #27 · megakid/ha_octopus_intelligent · GitHub

I got same/similar issue

The “Octopus Intelligent Offpeak End” entity provides the “unknown” state, rather than value.

Automation does not run then :confused:

posted as issue Entity "Octopus Intelligent Off-Peak End" is unknown. · Issue #29 · megakid/ha_octopus_intelligent · GitHub

Hi Tim, I’ve done quite a bit with this and PowerWall. Answer is that it does work and very well. I suggest you also get a Glow CAD so you can integrate your SMART meter into HASS. It will send MQTT direct to HASS.

You would be better off financially to export the excess solar and charge your car overnight or on intelligent charging slots.

But if you do charge with excess solar you won’t be charged for that. You are charged for the power you import through the meter.

Hi @G8YTZ Justin,

Do you have any code for your use of the CAD or links where I could find that please?

Thanx so much

Chris.

  1. Set up GLOW CAD:
  1. Install MQTT in HASS

  2. Add to config.yaml change “your_device_id” to your CAD ID If you have export MPAN, GAS, Water you can add these too using the same format. If you inspect the MQTT messages using the MQTT integration you can see what your meter is providing.

mqtt:
  sensor:

    - name: "Smart Meter Electricity: Energy Day"
      unique_id: "smart_meter_electricity_energy_day"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      device_class: "energy"
      unit_of_measurement: "kWh"
      state_class: "total_increasing"
      value_template: >
        {% if value_json['electricitymeter']['energy']['import']['day'] == 0 %}
          {{ states('sensor.smart_meter_electricity_energy_import') }}
        {% else %}
          {{ (value_json['electricitymeter']['energy']['import']['day']) | round(1) }}
        {% endif %}
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: Energy Week"
      unique_id: "smart_meter_electricity_energy_week"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      device_class: "energy"
      unit_of_measurement: "kWh"
      state_class: "total_increasing"
      value_template: >
        {% if value_json['electricitymeter']['energy']['import']['week'] == 0 %}
          {{ states('sensor.smart_meter_electricity_energy_import') }}
        {% else %}
          {{ (value_json['electricitymeter']['energy']['import']['week']) | round(1) }}
        {% endif %}
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: Energy Month"
      unique_id: "smart_meter_electricity_energy_month"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      device_class: "energy"
      unit_of_measurement: "kWh"
      state_class: "total_increasing"
      value_template: >
        {% if value_json['electricitymeter']['energy']['import']['month'] == 0 %}
          {{ states('sensor.smart_meter_electricity_energy_import') }}
        {% else %}
          {{ (value_json['electricitymeter']['energy']['import']['month']) | round(1) }}
        {% endif %}
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: Supplier"
      unique_id: "smart_meter_electricity_energy_supplier"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      value_template: >
        {% if value_json['electricitymeter']['energy']['import']['supplier'] == 0 %}
          {{ states('sensor.smart_meter_electricity_energy_import') }}
        {% else %}
          {{ value_json['electricitymeter']['energy']['import']['supplier'] }}
        {% endif %}
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: MPAN"
      unique_id: "smart_meter_electricity_energy_mpan"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      value_template: >
        {% if value_json['electricitymeter']['energy']['import']['mpan'] == 0 %}
          {{ states('sensor.smart_meter_electricity_energy_import') }}
        {% else %}
          {{ value_json['electricitymeter']['energy']['import']['mpan'] }}
        {% endif %}
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: RSSI"
      unique_id: "smart_meter_electricity_rssi"
      state_topic: "glow/your_device_id/STATE"
      device_class: "signal_strength"
      unit_of_measurement: "dB"
      state_class: "measurement"
      value_template: "{{ value_json['han']['rssi'] }}"
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: Link Quality"
      unique_id: "smart_meter_electricity_lqi"
      state_topic: "glow/your_device_id/STATE"
      device_class: "signal_strength"
      unit_of_measurement: "%"
      state_class: "measurement"
      value_template: "{{ (value_json['han']['lqi'] * (100/255)) | round() }}"
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: Power"
      unique_id: "smart_meter_electricity_power"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      device_class: "power"
      unit_of_measurement: "W"
      state_class: "measurement"
      value_template: "{{ (value_json['electricitymeter']['power']['value'] | round(4)) * 1000}}"
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: Energy Import"
      unique_id: "smart_meter_electricity_energy_import"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      device_class: "energy"
      unit_of_measurement: "kWh"
      state_class: "total_increasing"
      value_template: >
        {% if value_json['electricitymeter']['energy']['import']['cumulative'] == 0 %}
          {{ states('sensor.smart_meter_electricity_energy_import') }}
        {% else %}
          {{ (value_json['electricitymeter']['energy']['import']['cumulative']) | round () }}
        {% endif %}
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: Energy Export"
      unique_id: "smart_meter_electricity_energy_export"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      device_class: "energy"
      unit_of_measurement: "kWh"
      state_class: "total_increasing"
      value_template: >
        {% if value_json['electricitymeter']['energy']['export']['cumulative'] == 0 %}
          {{ states('sensor.smart_meter_electricity_energy_export') }}
        {% else %}
          {{ (value_json['electricitymeter']['energy']['export']['cumulative']) | round ()}}
        {% endif %}
      icon: "mdi:flash"

    - name: "Smart Meter Electricity: Import Unit Rate"
      unique_id: "smart_meter_electricity_import_unit_rate"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      device_class: "monetary"
      unit_of_measurement: "GBP"
      state_class: "measurement"
      value_template: "{{ value_json['electricitymeter']['energy']['import']['price']['unitrate'] }}"
      icon: "mdi:cash"

    - name: "Smart Meter Electricity: Import Standing Charge"
      unique_id: "smart_meter_electricity_import_standing_charge"
      state_topic: "glow/your_device_id/SENSOR/electricitymeter"
      device_class: "monetary"
      unit_of_measurement: "GBP"
      state_class: "measurement"
      value_template: "{{ value_json['electricitymeter']['energy']['import']['price']['standingcharge'] }}"
      icon: "mdi:cash"
  1. Construct dashboard and Energy Monitor to suit.
  2. Add other integrations like PowerWall and Intelligent Octopus integration to suit your circumstances.

1 Like

There’s also this custom component to make integrating it easier:

1 Like

automations.yaml:

Simple automation example:

  1. Switches Heat Pump on during off-peak times to thermally charge concrete floors.
  2. Switches Guest and Family Bathroom towels radiators on during off-peak morning session if outside temp. low.
  3. Charges PowerWall during normal and IO Go off-peak sessions

Note that in my KNX system I have the upstairs and downstairs “Climate Preset Modes” Data Points in the same group with the Towel radiators in separate groups for simplicity. You could achieve the same thing more elegantly with scenes.

- id: '1696957849339'
  alias: Off-Peak Electricity Actions
  description: Charge PowerWall during off-peak slots
  trigger:
  - platform: state
    entity_id:
    - binary_sensor.octopus_intelligent_slot
    from: 'off'
    for:
      hours: 0
      minutes: 0
      seconds: 0
    to: 'on'
  condition: []
  action:
  - service: number.set_value
    data:
      value: '100'
    target:
      entity_id: number.home_energy_gateway_backup_reserve
  - service: climate.set_preset_mode
    data:
      preset_mode: comfort
    target:
      entity_id:
      - climate.dining_hall_climate
      - climate.landing_climate
      - climate.master_ensuite_climate
  mode: single
- id: '1696960866136'
  alias: Peak Energy Actions
  description: Switches PowerWall to discharge
  trigger:
  - platform: state
    entity_id:
    - binary_sensor.octopus_intelligent_slot
    from: 'on'
    for:
      hours: 0
      minutes: 0
      seconds: 0
    to: 'off'
  condition: []
  action:
  - service: number.set_value
    data:
      value: '10'
    target:
      entity_id: number.home_energy_gateway_backup_reserve
  - service: climate.set_preset_mode
    data:
      preset_mode: eco
    target:
      entity_id:
      - climate.dining_hall_climate
      - climate.landing_climate
      - climate.master_ensuite_climate
      - climate.family_bathroom_climate
      - climate.guest_ensuite_climate
  mode: single
- id: '1697469550415'
  alias: Velux Reboot
  description: Reboots Velux KLF200 when Home Assistant shuts down
  trigger:
  - platform: homeassistant
    event: shutdown
  condition: []
  action:
  - service: velux.reboot_gateway
  mode: single
- id: '1698358549213'
  alias: 'Bathroom & Guest Radiators '
  description: Switch on Bathroom Rads if outside Temp below 10C
  trigger:
  - platform: time
    at: 04:30:00
  condition:
  - condition: numeric_state
    entity_id: sensor.outside
    below: 10
  action:
  - service: climate.set_preset_mode
    data:
      preset_mode: comfort
    target:
      entity_id:
      - climate.family_bathroom_climate
      - climate.guest_ensuite_climate
  mode: single

1 Like

Thanx Justin,

I had made a similar Automation to start my PW charging when that Intelligent sensor was active. But I’m still waiting to see the Octopus bill to see if my PW was actually recharging at the reduced OI rate…

1 Like

Can someone explain to me why the API keeps lying to me about dispatch slots? e.g. if I get a 11:00-12:00 slot, the API later tells me that I have 3 “completed dispatches” at 11:00-11:30, 11:30-12:00, and 12:00-12:30. Note there’s an extra slot at the end, which at the time was NOT labelled as “dispatch slot” in Home Assistant.

Am I the only one seeing this?? I can’t confirm yet but I’m pretty sure these extra slots are NOT billed at off-peak rates, which makes the API results useless right now.

try cross checking the actual Dispatched Slots on the Octopus App or website then you can have a reference to which check if the API is causing the issues.

I changed to teh Intelligent Tariff on the 2nd Dec. Then I got my Octopus bill from 5th November to 5th December and checked the additional slots that I had used on the 3rd was charged at the reduces Intelligent rate (Off Peak) and they were).

I can’t see anything in the app about completed dispatch slots.

Hi

I’m very new to this and hoping someone can help. Before realising this integration existed, I simply automated my inverter to discharge at 0 if my car charged for more than 7 minutes outside of the standard low rate period. However, that’s sub optimal and I’d like to charge the battery during any IO slots.

What I can’t work out is how to set my inverter to do this……

I can set the trigger to be be “octopus intelligent slot turned on” and add the condition as between the hours of 530am and 1130pm, but I can’t work out how to get the action of actually charging the inverter. There are plenty of ‘actions’ on the drop down when I choose the inverter as the device, but none that would actually set a charge. I’m guessing I can’t use the UI and will need to use code but I’m lost……

I’m sure this a moronic question, but can anyone help a noob please? I’m using a Solis inverter and have the SolaX Inverter Modbus integration set up.

Yeah you right, it’s not the same slots not delivered slots.

You have to use the automation to change your inverter into charging mode. What inverter and the do you have?

It depends on how your battery inverter works. I have a Tesla Powerwall so if I get a slot outside of usual off peak I just change the backup reserve to 100%, then when the slot or off peak finishes I put it back to my usual 15%.
In the summer I might try to update this to just stop discharge by setting the backup reserve = current battery level, but for the winter 100% is fine.
Hopefully someone with the same inverter will be along to help you.