Skip to content

Instantly share code, notes, and snippets.

View JBoye's full-sized avatar

Jonas Boye JBoye

  • LINDBERG Eyewear
  • Aarhus, Denmark
View GitHub Profile
@JBoye
JBoye / ChargeFinder.yaml
Last active July 12, 2023 12:49
Charge Finder
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
@JBoye
JBoye / EDS Basic Template.yaml
Last active October 26, 2022 18:40
Energi Data Service Template for additional costs
{# 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)}}
@JBoye
JBoye / EDS Lav-Høj-Spids Template.yaml
Last active October 26, 2022 18:41
Energi Data Service Template
{# 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 %}
@JBoye
JBoye / EDS Low Tax Template.yaml
Last active October 26, 2022 18:40
Energi Data Service Template with reduced tax
{# 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)}}
@JBoye
JBoye / Automation.yaml
Last active March 26, 2026 13:35
Home Assistant config to fetch danish numberplates from https://rapidapi.com/legoandreas/api/nummerpladetjekapi
alias: Nummerplade
description: ""
triggers:
- trigger: state
entity_id:
- sensor.garage_last_recognized_plate
- sensor.hoveddor_last_recognized_plate
not_to:
- unknown
- unavailable