Skip to content

Instantly share code, notes, and snippets.

View bmfurtado's full-sized avatar

Bruno Furtado bmfurtado

  • Google
  • New York City Area
View GitHub Profile
@bmfurtado
bmfurtado / door_hold_activation.yaml
Created September 19, 2026 19:49
Door-held activation (manual control preserved)
blueprint:
name: Door-held activation (manual control preserved)
description: >-
While a door is open, and for a configurable time after it closes, holds a
set of entities on and another set off (e.g. camera status light on,
camera privacy mode off). Afterwards it reverts only the entities it
actually changed, and only if they are still in the state it put them in,
so anything already active beforehand or changed by hand during the window
is left alone.
domain: automation
@bmfurtado
bmfurtado / sensor_triggered_light.yaml
Last active September 19, 2026 15:45
Sensor Triggered Light HA Automation Blueprint
blueprint:
name: Door light after dark (manual control preserved)
description: >-
Turns a light on for a set time when a door opens, but only when the sun is
below a configurable elevation. Never touches a light that was already on,
and backs off if the light is turned off manually during the window.
Re-opening the door during the window restarts the timer.
domain: automation
homeassistant:
min_version: 2024.10.0
@bmfurtado
bmfurtado / instructions.md
Last active February 19, 2022 21:38
Instructions to setup a simple custom RPi boot splash screen

Setup splash screen

  • Create a PNG of the appropriate size (check with fbset), put it in /home/pi/splash.png
  • /boot/config.txt
    • add disable_splash=1
  • /boot/cmdline.txt
    • add logo.nologo consoleblank=0 loglevel=1 quiet to the end of the cmdline
  • sudo systemctl disable getty@tty3
  • sudo apt install fbi
  • sudo vi /etc/systemd/system/splashscreen.service - fill with contents:
@bmfurtado
bmfurtado / map_codes.py
Created August 3, 2020 01:35
Map IR codes for smartir climate stuff
import base64
import broadlink
import click
import json
import pdb
def split_csv(ctx, param, value):
return [x.strip() for x in value.split(',')]
def generate_temps(min, max, step):
#!/usr/bin/env python
import urllib2
import json
import itertools
import sys
import argparse
def groupby(data, key):
kf = lambda x: x[key]
result = itertools.groupby(sorted(data,None,kf), kf)

Keybase proof

I hereby claim:

  • I am bmfurtado on github.
  • I am bmfurtado (https://keybase.io/bmfurtado) on keybase.
  • I have a public key whose fingerprint is 0A2D 3FA4 400D 50E2 FA6F FBA0 9F8D B6C6 2F7A 84B8

To claim this, I am signing this object:

@bmfurtado
bmfurtado / cssh.applescript
Last active January 5, 2025 03:00
Create multiple SSH sessions in split panes on iTerm2 and enable key broadcasting.
Moved to: https://github.com/bmfurtado/iterm2-cssh