Skip to content

Instantly share code, notes, and snippets.

View ronnyandre's full-sized avatar

Ronny-André Bendiksen ronnyandre

View GitHub Profile
@ronnyandre
ronnyandre / Shield_Intents.MD
Created August 24, 2022 19:34 — forked from mcfrojd/Shield_Intents.MD
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
blueprint:
name: Fibaro Dimmer 2 S2
description: |
Use this blueprint to create automations based on button presses for the Fibaro Dimmer 2
domain: automation
input:
fibaro_entity:
name: Fibaro Dimmer
description: The Fibaro Dimmer that will trigger the scenes
selector:
// This #include statement was automatically added by the Particle IDE.
#include <MQTT.h>
int led = D7;
int drippBryter = D1;
int sprederBryter = D2;
String ipString;
SYSTEM_MODE(MANUAL)
STARTUP(WiFi.selectAntenna(ANT_INTERNAL))
@ronnyandre
ronnyandre / main.py
Created February 15, 2021 19:27 — forked from enlavin/main.py
KMK circuitpython macropad firmware
import board
from kmk.kmk_keyboard import KMKKeyboard
from kmk.matrix import DiodeOrientation
from kmk.keys import KC
keyboard = KMKKeyboard()
keyboard.col_pins = (board.GP2, board.GP3, board.GP4, board.GP5)
keyboard.row_pins = (
board.GP21,
board.GP20,
@ronnyandre
ronnyandre / fluks-jumping-logo-2.markdown
Created February 11, 2021 12:37
fluks jumping logo 2
@ronnyandre
ronnyandre / flow.json
Created March 10, 2020 10:22
Example deConz event flow in Home Assistant
[{"id":"4cb2d8d4.f1ff18","type":"tab","label":"deCONZ Events","disabled":false,"info":""},{"id":"cfeb8db3.53c14","type":"server-events","z":"4cb2d8d4.f1ff18","name":"Event","server":"3e887f6c.e8ac3","event_type":"deconz_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":150,"y":140,"wires":[["425b6f10.008f3"]]},{"id":"425b6f10.008f3","type":"switch","z":"4cb2d8d4.f1ff18","name":"Get Device ID","property":"payload.event.unique_id","propertyType":"msg","rules":[{"t":"eq","v":"00:15:8d:00:01:e7:94:de","vt":"str"},{"t":"eq","v":"00:15:8d:00:02:9a:93:e4","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":320,"y":140,"wires":[["2b31e17a.901bfe"],["73e0606f.383dc"]]},{"id":"2b31e17a.901bfe","type":"switch","z":"4cb2d8d4.f1ff18","name":"Event Type","property":"payload.event.event","propertyType":"msg","rules":[{"t":"eq","v":"1002","vt":"str"},{"t":"eq","v":"1004","vt":"str"},{"t":"eq","v":"1001","vt":"str"},{"t":"eq","v":"1003","vt":"str"}],"
@ronnyandre
ronnyandre / batteryStatus.ino
Created February 13, 2017 09:54
Get Arduino Battery Status
// Function created to obtain chip's actual Vcc voltage value, using internal bandgap reference
// This demonstrates ability to read processors Vcc voltage and the ability to maintain A/D calibration with changing Vcc
// Now works for 168/328 and mega boards.
// Thanks to "Coding Badly" for direct register control for A/D mux
// 1/9/10 "retrolefty"
int battVolts; // made global for wider avaliblity throughout a sketch if needed, example a low voltage alarm, etc
void setup(void)
{
@ronnyandre
ronnyandre / gist:5822886bd25a8ba9f895
Last active August 29, 2015 14:07
WCAG 2.0 A/AA / Tilgjengelighetsloven

Images

  • Alternative text is required. The alternative text is not the same as image description in WP. Alt text should explain what the photo shows.
  • Alt text for linked images should describe the link, not the image.
  • Hi-res (retina or SVG) is good for users who need to zoom.

RESP: Editor/designer/developer.

Colors

@ronnyandre
ronnyandre / header.html
Created June 5, 2014 08:04
All Search and Social Media Meta Tags Starter Template
<!-- Search Engines / Google -->
<meta name="author" content="Wikipedia User">
<meta name="description" content="Telangana is a state in southern India. It was part of the princely state of Hyderabad (Medak and Warangal Divisions) which was ruled by the Nizams during the British Raj until 1947, and later until 1948, when it joined the Union of India.">
<!-- Social: Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@wikipedia">
<meta name="twitter:creator" content="wikipedia_user">
<meta name="twitter:title" content="Telangana">
<meta name="twitter:description" content="Telangana is a state in southern India. It was part of the princely state of Hyderabad (Medak and Warangal Divisions) which was ruled by the Nizams during the British Raj until 1947, and later until 1948, when it joined the Union of India.">
@ronnyandre
ronnyandre / gist:8351604
Created January 10, 2014 13:04
Resize PDF with WP_Image_Editor to square JPEG thumbnail.
<?php
// Load PDF
$img = wp_get_image_editor( 'my/temp/uploads/path/mypdf.pdf' );
// Resize PDF
$img->resize( 50, 50, TRUE );
// Generate filename
$filename = $img->generate_filename( 'thumb', 'wp/wp-content/uploads/thumbs/', 'jpg' );