Skip to content

Instantly share code, notes, and snippets.

View lukasjakobi's full-sized avatar
🛰️

Lukas Jakobi lukasjakobi

🛰️
  • Germany
View GitHub Profile
@lukasjakobi
lukasjakobi / motion-sensor-blueprint.yaml
Last active July 19, 2025 10:54
Home Assistant Motion Sensor Blurprint (by Lukas Jakobi)
blueprint:
name: Time-based Light Scenes with Motion, Blocker, and Sun Elevation
description: >
Dimmt nach Inaktivität erst sanft runter und schaltet dann ab.
Bei neuer Bewegung wird das Licht sofort eingeschaltet, aber nur wenn der Sonnenstand unter dem konfigurierten Wert liegt.
Szenen können abhängig von Tageszeiten festgelegt werden.
Optionaler Blocker verhindert Aktionen.
domain: automation
input:
motion_sensor:
@lukasjakobi
lukasjakobi / vacuum_notification.jinja
Created February 16, 2024 17:23
Jinja2 Template for Vacuum Mop Attach/Detach Notification
{% set now = now() %}
{% set earliest_reminder = '05:00:00' %}
{% set latest_reminder = '21:00:00' %}
{% set start_time = '15:00:00' %}
{% set end_time = '11:00:00' %}
{% set current_weekday = now.weekday() %}
{% set current_time = now.strftime('%H:%M:%S') %}
{% set water_box_attached = state_attr('vacuum.roborock_qrevo', 'waterBoxCarriageStatus') == 1 %}
{% set weekdays = [0, 3] %}
@lukasjakobi
lukasjakobi / output.txt
Created December 11, 2023 19:01
Advent of Code Day 10 - Stupid Solution Output
╔╗╔╗ ╔═╗
╔╝╚╝╚╗╔╗ ║╔╝
╚══╗╔╝║║╔═╝║ ╔╗
╔╗║╚╗║║║╔╗║╔╗ ╔╝║ ╔╗
@lukasjakobi
lukasjakobi / README.md
Last active August 1, 2024 20:34 — forked from networkingcat/yet_another_motion_automation.yaml
Homeassistant blueprint for motion-activated light scene

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

@lukasjakobi
lukasjakobi / BuilderPattern.java
Created February 7, 2022 19:04
Builder Pattern Example
public class Main
{
public static void main(String[] args) {
// what do all these parameters mean?
Account account = new Account(1, "Otto", "Päde", 50, "Haselnussstraße", 0, null, "user", false);
// or with builder pattern
Account account = new AccountBuilder()
.withId(1)
.withFirstName("Otto")
@lukasjakobi
lukasjakobi / TimeManager.java
Last active January 5, 2022 07:46
Millisecond to Time String Converter
package de.perfectban.util;
import java.util.*;
public class TimeManager
{
private final LinkedHashMap<Character, Long> timeKeys;
public TimeManager() {
this.timeKeys = new LinkedHashMap<>();