Open agoberg2 opened 1 year ago
Thanks for the suggestion. I'm aware of this need. However, there a couple of other things I plan to do first, and also, this is a rather big feature so it's difficult to make any promises.
I have adjusted the price in the data_generator in the apexcharts-card
type: custom:apexcharts-card now: show: true color: rgb(244,160,0) locale: en header: show: false show_states: true colorize_states: true graph_span: 2d yaxis:
entity: sensor.tesla_3_charging name: Price incl. Tariff, TAX and VAT. unit: ' DKK/kWh' data_generator: | return entity.attributes.raw_two_days.map((entry) => { let value = entry.value; let start = new Date(entry.start); let hourOfDay = start.getHours();
const GovermentTAX = 1.01;
const EnergyCompany = 0.10;
const TariffBetween00And06 = 0.15;
const TariffBetween06And17 = 0.23;
const TariffBetween17And21 = 0.60;
const TariffBetween21And00 = 0.23;
// Apply GovermentTAX for all hours
value += GovermentTAX;
// Apply EnergyCompany adjustment for all hours
value += EnergyCompany;
// Apply additional Tariff based on different time ranges
if (hourOfDay >= 0 && hourOfDay < 6) {
value += TariffBetween00And06;
} else if (hourOfDay >= 6 && hourOfDay < 17) {
value += TariffBetween06And17;
} else if (hourOfDay >= 17 && hourOfDay < 21) {
value += TariffBetween17And21;
} else if (hourOfDay >= 21 || hourOfDay < 6) {
value += TariffBetween21And00;
}
start.setHours(start.getHours() + 0); // subtract hours
return [start, value];
}); type: line curve: stepline float_precision: 2 show: in_header: before_now extend_to: false color_threshold:
@agoberg2 I'm not sure if this is useful to you, but I use a statistics sensor to monitor electricity usage over the last 58 minutes, and reduce amps to the charger if the average is approaching the level where the extra tariff will be imposed.
In my case, the source sensor here is a Tibber pulse, adjust as needed
sensor:
- platform: statistics
name: "Average power consumption last 58 minutes"
entity_id: sensor.power_my_address
state_characteristic: mean
max_age:
minutes: 58
sampling_size: 766
precision: 0
And then I have a simple automation to limit the charger to 18A and notify me by phone.
alias: Limit charging speed if exceeding 10 kWh
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.average_power_consumption_last_58_minutes
above: 10000
condition:
- condition: state
entity_id: sensor.ehp2w7gj_status
state: charging
action:
- service: easee.set_circuit_dynamic_limit
data:
device_id: 3f7d4e22a56efcc339b5b00196b881ee
currentP1: 18
- service: notify.mobile_app_my_iphone
data:
message: Begrenser ladehastighet
mode: single
It usually kicks in a few times a month from November through March. Where I live the tariff component is determined by the average of the three hours with highest consumption during a calendar month, and reducing the charger is by far the most effective way to stay under the desired limit (10 kWh in my case), while still allowing charging at reasonable speeds during the night when its is generally cheaper (22:00-06:00).
I have an additional helper to keep track of the number of times (hours) I've exceeded the threshold, so far that has only happened twice in a year and a half. So this works, this little automation saves me almost 300 NOK per month during the winter.
Not an issue, more like an idea for a feature. In Norway we have to pay an extra fixed prices on top of our electricity bill. The amount you have to pay is set based on how much electricity you use within one hour. See for example this page https://www.elvia.no/nettleie/alt-om-nettleiepriser/nettleiepriser-for-privatkunder/
What do you think about trying to incorporate this into the integration? For example by turning off charging for a little while if electricity usage is close to the limits of the tariff. And turning it on again when it resets every hour. Would obviously need a sensor that monitors electricity usage, but alot of people have that.
Great integration by the way!