slipx06 / sunsynk-power-flow-card

⚡A customizable Home Assistant card to emulate the Sunsynk System flow that's displayed on the Inverter screen.
MIT License
178 stars 52 forks source link

Show the Octopus Export and Import rate depending on direction #63

Closed bazcurtis closed 1 year ago

bazcurtis commented 1 year ago

Is there an existing issue for this?

Current Behavior

Shows the import rate

Expected behaviour

Currently works as designed

Possible Solutions

Show the Octopus Export and Import rate depending on direction. Change colour or add an arrow and show the current price depending on if you are importing or exporting

Mode

Both

Context / Reason

It shows importing all the time, even if you are exporting. I thought it might be nice to the price on what is happening at the time.

This is the best energy card out there for Home Assistant in my view.

slipx06 commented 1 year ago

Hi. I have no way of testing this so will need a bit more information. The card shows import or export based on the animated power flow and the power value (+-). Does Octopus provide separate sensors when importing or exporting?

marksie1988 commented 1 year ago

Hi. I have no way of testing this so will need a bit more information. The card shows import or export based on the animated power flow and the power value (+-). Does Octopus provide separate sensors when importing or exporting?

The octopus integration provides the price for import and price for export.

assuming I understand correctly, we could update the energy_cost with the following:

export_price: sensor.octopus_export
import_price: sensor.octopus_import

Then depending on the flow of the electricity we can pick which of these options to use?

bazcurtis commented 1 year ago

I am using this Integration

it has these two sensors.

sensor.agile_current_import_rate sensor.agile_current_export_rate

I am happy to do any testing if you decide to implement this

Screenshot 2023-08-25 at 09 40 38
slipx06 commented 1 year ago

Ok I understand. It can be implemented as per @marksie1988 suggestion above

slipx06 commented 1 year ago

I've added this to https://github.com/slipx06/sunsynk-power-flow-card/releases/tag/2.2.0

Attribute | Requirement | Default | Description -- | -- | -- | -- energy_cost_buy: | Optional |   | Sensor that provides current buy energy cost per kWh energy_cost_sell: | Optional |   | Sensor that provides current sell energy cost per kWh

The card will display the correct cost based on grid power

bazcurtis commented 1 year ago

Thanks for adding this. The sun has just gone in and I am using the battery 😄. I will check it.

bazcurtis commented 1 year ago

Working fantastic. Thank you very much.