Skip to content

Instantly share code, notes, and snippets.

View lukasjakobi's full-sized avatar
🛰️

Lukas Jakobi lukasjakobi

🛰️
  • Germany
View GitHub Profile
@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 / yet_another_motion_automation.yaml
Created November 26, 2023 21:22 — forked from networkingcat/yet_another_motion_automation.yaml
Homeassistant blueprint for motion-activated light scene
blueprint:
name: Yet Another Motion Automation
description: >
# YAMA V10
Turn on lights or scenes when motion is detected.
Four different scenes can be defined depending on time of day.
@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<>();