This file contains hidden or 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
{# Find lavlast, spidslast og evt. fortjeneste/tillæg på elspotpris.dk #} | |
{% set spidslast = 0.4537 %} | |
{% set lavlast = 0.1636 %} | |
{% set tillaeg = 0 %} | |
{% set afgift = 0.723 if (states("sensor.manedligt_elforbrug") | float(0) < 334) else 0.008 %} | |
{% set tariffer = [0.00229, 0.061, 0.049] | sum %} | |
{% set spids = (now().month < 3 or now().month >= 10) and (now().hour >= 17 and now().hour <= 19) %} | |
{{tillaeg + afgift + tariffer + (spidslast if spids else lavlast)}} |
This file contains hidden or 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
{# Find lavlast, spidslast og evt. fortjeneste/tillæg på elspotpris.dk #} | |
{% set lavlast = 0.13976 %} | |
{% if (now().month < 3 or now().month >= 10) %} | |
{# vinter takst #} | |
{% set hojlast = 0.4192 %} | |
{% set spidslast = 1.2576 %} | |
{% else %} | |
{# sommer takst #} | |
{% set hojlast = 0.2096 %} | |
{% set spidslast = 0.54496 %} |
This file contains hidden or 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
{# Find lavlast, spidslast og evt. fortjeneste/tillæg på elspotpris.dk #} | |
{% set spidslast = 0.4537 %} | |
{% set lavlast = 0.1636 %} | |
{% set tillaeg = 0 %} | |
{% set tariffer = [0.723, 0.00229, 0.061, 0.049] | sum %} | |
{% set spids = (now().month < 3 or now().month >= 10) and (now().hour >= 17 and now().hour <= 19) %} | |
{{tariffer + tillaeg + (spidslast if spids else lavlast)}} |
This file contains hidden or 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
sensor: | |
- platform: rest | |
name: Clever Aarhus Havn | |
resource: https://api.chargefinder.com/status/pjyd79 | |
scan_interval: 120 | |
value_template: '{{ value_json|selectattr("status", "eq", 2)|list|length }}' | |
headers: | |
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.59 | |
origin: https://chargefinder.com |
This file contains hidden or 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
lovelace: | |
resources: | |
- url: /local/garage-icons.js?v=1.0 | |
type: module |
This file contains hidden or 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
template: | |
- sensor: | |
- name: Under gennemsnit | |
state: > | |
{% set start_time = now().hour %} | |
{% set prices = (state_attr("sensor.elpris", "today") + state_attr("sensor.elpris", "tomorrow"))[start_time:] %} | |
{% set index = prices.index(prices | select('lt', prices | average) | first) %} | |
{{today_at("00:00") + timedelta(hours = index + start_time)}} |
This file contains hidden or 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
sensor: | |
- platform: template | |
sensors: | |
jenny_electric_price: | |
friendly_name: Jenny KR pr KM EL | |
unit_of_measurement: "kr/km" | |
icon_template: mdi:ev-station | |
value_template: > | |
{{ ((states("sensor.elpris") | float) / 4) | round(2) }} {# 4 km/kwh #} |
This file contains hidden or 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
"use strict"; | |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | |
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | |
return new (P || (P = Promise))(function (resolve, reject) { | |
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | |
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | |
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | |
step((generator = generator.apply(thisArg, _arguments || [])).next()); | |
}); | |
}; |
This file contains hidden or 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
{% set nettarif_c_time_lavlast = 0.1315 %} | |
{% set nettarif_c_time_spidslast = 0.425 %} | |
{% set additional_cost = { | |
"trans_nettarif": 0.06125, | |
"systemtarif": 0.07625, | |
"balancetarif_forbrug": 0.002875, | |
"pso_tarif": 0.00, | |
"elafgift": 1.12875, | |
"abonnement_net": 0.00 / 730, | |
"eltillaeg_ellev": 0.00, |
This file contains hidden or 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
{% set battery_level = states("sensor.jenny_battery_level") | float %} | |
{% set departure_time = 16 %} {# could be calculated or another sensor #} | |
{% set current_time = now().hour %} | |
{% set departure_time = departure_time + 24 if departure_time <= current_time else departure_time %} | |
{{departure_time}} | |
{% set battery_capacity = 10 %} {# kWh #} | |
{% set charging_speed = 3.7 %} {# kW #} |
NewerOlder