Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Blake Niemyjski niemyjski

😀
View GitHub Profile
@niemyjski
niemyjski / save-camera-snapshot-notification-on-motion.yaml
Last active Dec 18, 2020
Home Assistant Blueprint - Save a camera snapshot with archive when motion is detected
View save-camera-snapshot-notification-on-motion.yaml
blueprint:
name: Save a camera snapshot when motion is detected
description: Save a camera snapshot with archive when motion is detected
domain: automation
source_url: https://gist.github.com/niemyjski/08c566a4fe64fb2e70998ee4f38c9d1e
input:
motion_sensor:
name: Motion sensor
description: The sensor wich triggers the snapshot creation
selector:
@niemyjski
niemyjski / exceptionless.cs
Last active Dec 15, 2020
Exceptionless Ignore Third Party Exceptions
View exceptionless.cs
// Create our own client instance so we aren't conflicting if anyone else is using exceptionless in an addon.
private readonly ExceptionlessClient _client = new ExceptionlessClient();
_client.Configuration.AddPlugin<IgnoreLicensingAndNonGeneratorExceptionsPlugin>();
[Priority(30)]
private class IgnoreLicensingAndNonGeneratorExceptionsPlugin : IEventPlugin {
private static readonly List<string> _handledNamespaces = new List<string> {
"MyNamespace",
"MyThirdPartyDependencyNamespace"
};
@niemyjski
niemyjski / motion_switch_illuminance.yaml
Created Dec 15, 2020
homeassistant blueprint - Turn on a switch when motion is detected and Illuminance is low.
View motion_switch_illuminance.yaml
blueprint:
name: Turn the switch on when motion is detected
description: Turn on a switch when motion is detected and Illuminance is low.
domain: automation
source_url: https://github.com/niemyjski/home-assistant-config/tree/master/blueprints/automation/niemyjski/motion_switch.yaml
input:
motion:
name: Motion Sensor
description: The motion sensor wich triggers the light to turn on
selector:
@niemyjski
niemyjski / motion_light_illuminance.yaml
Created Dec 15, 2020
homeassistant blueprint - Turn on a light when motion is detected and Illuminance is low.
View motion_light_illuminance.yaml
blueprint:
name: Turn the light on when motion is detected
description: Turn on a light when motion is detected and Illuminance is low.
domain: automation
source_url: https://github.com/niemyjski/home-assistant-config/tree/master/blueprints/automation/niemyjski/motion_light.yaml
input:
motion:
name: Motion Sensor
description: The motion sensor wich triggers the light to turn on
selector:
View smartweather.yaml
- badges: []
cards:
- entity: weather.smartweather
name: Forecast
show_forecast: true
type: weather-forecast
- entities:
- entity: sensor.smartweather_wind_bearing
- entity: sensor.smartweather_wind_chill
- entity: sensor.smartweather_wind_direction
@niemyjski
niemyjski / Python3 Virtualenv Setup.md
Created Jan 30, 2020 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac
View Python3 Virtualenv Setup.md

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@niemyjski
niemyjski / main.py
Created Jan 19, 2020
Kohler DTV+ Proxy Disconnect Issue
View main.py
import aiohttp
import asyncio
import requests
async def main():
url = "http://IP_OF_SHOWER_CONTROLLER_HERE/values.cgi?_=1579384493390"
response = requests.get(url)
print(response.json())
@niemyjski
niemyjski / description.md
Last active Feb 6, 2021
Report Home Assistant Battery Levels With Node-RED
View description.md

I decided to share this snippet based on seeing what others were doing in this thread: https://www.reddit.com/r/homeassistant/comments/emvk9y/how_do_you_monitor_sensor_battery_levels_looking/

Basically dome device types of battery report the state in different locations and with different string values that the change node or conditional logic just doesn't work nicely. Using the conditional logic on this string state value might not be working fully how we think it is or at least didn't for me. When I was debugging it and getting 10 outputted in a 100 bucket via the gt condition. The best way I've found to handle these conditions is with a function node.

Home Assistant Feedback

@niemyjski
niemyjski / configuration.yaml
Created Dec 26, 2019 — forked from AdamNaj/about.md
Z Wave Graph for Home Assistant
View configuration.yaml
panel_custom:
- name: zwavegraph2
sidebar_title: Z-Wave Graph
sidebar_icon: mdi:access-point-network
url_path: zwave
@niemyjski
niemyjski / test.cs
Created Dec 20, 2019
json.net system.version bug with .net core 3.1
View test.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Text;
using Exceptionless.Core.Extensions;
using Exceptionless.Core.Models;
using Exceptionless.Core.Models.Data;
using Exceptionless.Serializer;
using Foundatio.Serializer;