Skip to content

Instantly share code, notes, and snippets.

View danielolsson100's full-sized avatar

Daniel Olsson danielolsson100

View GitHub Profile
@danielolsson100
danielolsson100 / configuration.yaml
Last active November 3, 2025 16:28
Logic to minimize the tariff costs in Home Assistant
# Sensor data for Home assistant to handle EON upcomping effect tariffs that will go live 2026-11-01 in SE4 in Sweden
# According to my knowledge the tariff will only occur between 1 november to 31 March and only Monday to friday between 7-19
# Grid Energy Peak Hourly Monthly Tariff: Will be 0 if there is no data for the sensor.
# Grid Import Limit: Will be used in my Ferroamp system to do peak shaving with the higest hour peak of the month.
# When no tariff cost are active then use all my availabe effect (11kW / 16A fuse).
# Grid Energy Peak Hourly Monthly: Just to see the higest hour effect peak of the month.
# Grid Energy Peak Hourly Daily Tariff: Daily hour energy peak during tariff prices.
# Grid Energy Peak Hourly Daily: Just to see the higest hour eccect peak of the day.
# Tariff Mode: Binary sensor to use tariff mode or not.
@danielolsson100
danielolsson100 / automation.yaml
Created October 25, 2025 14:21
automation.yaml
alias: Battery - FMB - Define Export Threshold
description: ""
triggers:
- entity_id:
- sensor.easee_status
trigger: state
- minutes: /15
trigger: time_pattern
- trigger: state
entity_id:
@danielolsson100
danielolsson100 / configuration.yaml
Last active November 2, 2025 18:23
Ferroamp Modbus TCP
Home Asssistant Ferroamp Modbus TCP
Ferroamp support needs to enable Modbus TCP for this to work
# Cred: Robin Östlund for the mapping
# Ref: https://ferroamp.com/wp-content/uploads/2023/04/Ferroamp-Modbus-TCP-Specification-RevD-2.pdf
configuration.yaml
-------------------------------------
modbus:
- name: ferroamp_modbus
type: tcp
@danielolsson100
danielolsson100 / configuration.yaml
Last active November 1, 2025 08:50
ferroamp - charge or discharge battery sensor with home assistant and nordpool
binary_sensor:
- platform: template
sensors:
bs_charge_ferroamp_battery:
friendly_name: Charge Ferroamp Battery
unique_id: bs_charge_ferroamp_battery
value_template: >-
{# Charge logic (6 hours = 24 quarters at 15-min intervals) - v1.3 #}
{% set sensor = 'sensor.nordpool_kwh_se4_sek_2_10_025' %}
{% set today = state_attr(sensor, 'today') | default([]) %}
alias: Ferroamp > HA > Easee => Grid Equlizer
description: ""
trigger:
- platform: state
entity_id:
- sensor.ferroamp_grid_current
condition:
- condition: and
conditions:
- condition: numeric_state
@danielolsson100
danielolsson100 / Ferroamp and Easee.txt
Last active September 2, 2022 11:13
update easee charger threshold from ferroamp data
This is instructions to dynamic update Easee charger circuit limit with dynamic data from ferroamp without adding additional load to ACE.
Reguired components:
Home Assistant with an Easee charger and Ferroamp Energyhub
Integrations:
https://github.com/henricm/ha-ferroamp
https://github.com/fondberg/easee_hass
You need to know or find your circuit id of your Easee charger and that is displayed in various places in the HA / Easee integration.