Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
I’m not a human. I’m a piece of machinery. I think everybody should be a machine

Franck Nijhof frenck

🤖
I’m not a human. I’m a piece of machinery. I think everybody should be a machine
View GitHub Profile
@frenck
frenck / selectors.yaml
Last active Dec 4, 2020
Device selectors
View selectors.yaml
blueprint:
name: Test blueprint
domain: automation
input:
trigger_event:
name: Event to trigger on
description: This is a field you have to fill out
service_to_call:
name: Service to call
entity:
@frenck
frenck / 1-introduction.md
Last active Jun 18, 2020
Home Assistant Scripts & Automations Syntax Idea Palette
View 1-introduction.md

This is a gist for me personally to play and think about extending the Home Assistant script & automation engine and its syntax.

This is in no way a direction Home Assistant is going, and is just a personal idea/notebook.

View 01-types.yaml
---
#
# Let first talk about the different types in YAML
#
# It is important to understand the differences and terms.
# Not just for configuration splitting, but in general!
#
# Scalar values: String, Integer, Float, Boolean, Null
# Comments
# Collections: List (sequence), Dictionary (mapping) (important for splitting!)
View CRC16.py
from ctypes import c_ushort
class CRC16(object):
crc16_tab = []
# The CRC's are computed using polynomials. Here is the most used
# coefficient for CRC16
crc16_constant = 0xA001 # 40961
@frenck
frenck / doorbell.yaml
Last active Aug 14, 2021
Blog: For just $2, convert any existing wired doorbell into a smart doorbell; using ESPHome and Home Assistant: https://frenck.dev/diy-smart-doorbell-for-just-2-dollar/
View doorbell.yaml
---
esphome:
name: doorbell
platform: ESP8266
board: esp01_1m
# WiFi connection, correct these
# with values for your WiFi.
wifi:
ssid: !secret wifi_ssid
View shield.yaml
media_player:
- platform: androidtv
host: 192.168.5.194
name: SHIELD
adb_server_ip: local-adb
adb_server_port: 5037
@frenck
frenck / basic.yaml
Created Jan 22, 2019
Sonoff Basic ESPHome
View basic.yaml
esphomeyaml:
name: basic
platform: ESP8266
board: esp01_1m
board_flash_mode: dout
wifi:
ssid: 'Demo'
password: 'Livestream'
@frenck
frenck / pow.yaml
Created Jan 22, 2019
Sonoff POW R2 Washing Machine Sensor Example
View pow.yaml
esphomeyaml:
name: pow
platform: ESP8266
board: esp01_1m
board_flash_mode: dout
wifi:
ssid: 'Demo'
password: 'Livestream'
@frenck
frenck / .zshrc
Created Dec 11, 2018
My ZSH config
View .zshrc
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$(brew --prefix coreutils)/libexec/gnubin:$PATH
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# Path to your oh-my-zsh installation.
export ZSH="/Users/frenck/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
View phpcs_issue_63_composer.json
{
"name": "drupal-composer/drupal-project",
"description": "Project template for Drupal 8 projects with composer",
"type": "project",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "",
"role": ""
}