Skip to content

Instantly share code, notes, and snippets.

@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",
@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 / minvolkswagen.json
Last active December 10, 2021 16:24
NodeRED subflow for retrieving car data from MinVolkswagen
[
{
"id": "19d4699.ad77196",
"type": "subflow",
"name": "Get cars",
"info": "",
"category": "",
"in": [
{
"x": 260,
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 / 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 / gist:8a8c5a5def754d123da71d6df6a58934
Created April 2, 2020 14:59
Lovelace card for displaying renovation sensors in Home Assistant
entities:
- entity: sensor.renovation_restaffald_formatted
name: Restaffald
icon: mdi:trash-can
- entity: sensor.renovation_emballage_formatted
name: Emballage
icon: mdi:recycle
- entity: sensor.renovation_pappapir_formatted
name: Pap og papir
icon: mdi:newspaper
@esbenr
esbenr / gist:c1b0970548a2431ab75be24ea82c20e0
Created April 2, 2020 14:53
Utilizing Renosyds API to integrate garbage collection into Home Assistant
sensor:
- platform: rest
resource: http://skanderborg.netdialog.renosyd.dk/service/Restservice.svc/json/commonapp1/address/123964/containers
username: !secret renosyd_username
password: !secret renosyd_password
authentication: basic
headers:
Content-Type: application/json
scan_interval: 360
json_attributes:
@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 / 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: