Skip to content

Instantly share code, notes, and snippets.

View hrosenbauer's full-sized avatar

Hannes Rosenbauer hrosenbauer

View GitHub Profile
alias: "[Washing] Done"
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_power
for:
hours: 0
minutes: 0
seconds: 0
above: "500"
@hrosenbauer
hrosenbauer / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active December 6, 2022 09:09 — forked from sbyx/low-battery-level-detection-notification-for-all-battery-sensors.yaml
Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@hrosenbauer
hrosenbauer / uri.js
Last active December 26, 2015 23:29 — forked from jlong/uri.js
parse url in the browser
var parser = document.createElement('a');
parser.href = 'http://example.com:3000/pathname/?search=test#hash';
parser.protocol; // => 'http:'
parser.hostname; // => 'example.com'
parser.port; // => '3000'
parser.pathname; // => '/pathname/'
parser.search; // => '?search=test'
parser.hash; // => '#hash'
parser.host; // => 'example.com:3000'