Skip to content

Instantly share code, notes, and snippets.

#LEGO Mindstorm 2019
Velkommen til LEGO Mindstorm robot holdet.
@esbenr
esbenr / ArduinoIntersectionLight.ino
Last active March 4, 2020 20:18
Arduino Intersection Light
int ledRed = 2;
int ledYellow = 3;
int ledGreen = 4;
int signalIn = 12;
int signalOut = 11;
int signalValue = 0;
int del = 2000;
void setup() {
// put your setup code here, to run once:
@esbenr
esbenr / main-lights.yaml
Created March 6, 2020 12:23
Configuration for main lights in HA
type: horizontal-stack
cards:
- type: vertical-stack
cards:
- entity: light.kokken
type: entity-button
name: Køkken
icon_height: 40px
hold_action:
action: more-info
@esbenr
esbenr / miflorahost.yaml
Last active July 22, 2020 11:04
MiFlora Host on ESP32 Wroom
esphome:
name: miflorahost
platform: ESP32
board: esp32dev
wifi:
ssid: "wifissid"
password: "wifipsw"
# Enable fallback hotspot (captive portal) in case wifi connection fails
@esbenr
esbenr / espdoorbell.yaml
Created April 10, 2020 16:37
ESPHome configuration for video doorbell with TTGO-Camera w/u mic.
# Product found here: https://www.aliexpress.com/item/32968683765.html
substitutions:
devicename: espdoorbell
friendly_name: ESPDoorbell
esphome:
name: $devicename
platform: ESP32
board: esp32dev
@esbenr
esbenr / car.yaml
Last active February 23, 2021 07:29
Car picture-element card example
type: picture-elements
image: /local/images/touran.png
state_filter:
"home": brightness(100%)
"not_home": brightness(50%)
elements:
- type: state-label
entity: device_tracker.vw_touran
icon: mdi:home
style:
@esbenr
esbenr / ParsingConnectedCarsJsonSubflow
Created February 23, 2021 08:50
Node-RED nodes for parsing JSON from connectedcars.io subflow
[
{
"id":"5702eca4.c373e4",
"type":"api-call-service",
"z":"93e5dfe8.6683b",
"name":"Device tracker",
"server":"84d7c1be.d21e3",
"version":1,
"debugenabled":false,
"service_domain":"device_tracker",
1. Create a group in z2m groups.yaml, containing the lights you want to control.
'2':
friendly_name: light_living_room
retain: false
optimistic: true
transition: 2
devices:
- '0xccccccfffeb9bbcf'
- '0xccccccfffebac1e0'
@esbenr
esbenr / tv.yaml
Created May 15, 2020 10:37
Afspil DR TV til Chromecast fra Lovelace
type: horizontal-stack
cards:
- type: picture
image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/DR1_2017_logo.svg/1200px-DR1_2017_logo.svg.png'
tap_action:
action: call-service
service: media_player.play_media
service_data:
entity_id: media_player.stuen_tv
media_content_id: https://dr01-lh.akamaihd.net/i/live/dr01_0@147054/index_3000_av-p.m3u8
@esbenr
esbenr / scenes.json
Last active March 16, 2021 13:06
Scenes and Colors for Home Assistant
{
"terrace":{
"entity":"light.terrace",
"scenes":[
"scene.terrace_low",
"scene.terrace_medium",
"scene.terrace_high"
],
"colors":[
[