Skip to content

Instantly share code, notes, and snippets.

View rmarskell's full-sized avatar
😎

Richard Marskell rmarskell

😎
View GitHub Profile
@rmarskell
rmarskell / low-battery-level-detection-notification-for-all-battery-sensors.yaml
Last active November 27, 2021 08:55 — 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').
@rmarskell
rmarskell / Get_All_Routes_in_ASP.NET_MVC_Core_2.cs
Last active September 6, 2018 07:12 — forked from mckabue/Get_All_Routes_in_ASP.NET_MVC_Core_2.cs
Get all routes, including default routes specified at start up
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;