Skip to content

Instantly share code, notes, and snippets.

class EntityRegistryDisabledHandler:
"""Handler to handle when entities related to config entries updating disabled_by."""
def __init__(self, hass: HomeAssistant) -> None:
"""Initialize the handler."""
self.hass = hass
self.registry: Optional[entity_registry.EntityRegistry] = None
self.changed: Set[str] = set()
View example_options_flow.diff
diff --git a/homeassistant/components/unifi/ b/homeassistant/components/unifi/
index e5a8965df..06751ed6e 100644
--- a/homeassistant/components/unifi/
+++ b/homeassistant/components/unifi/
@@ -2,6 +2,7 @@
import voluptuous as vol
from homeassistant import config_entries
+from homeassistant.core import callback
from homeassistant.const import (
balloob / configuration.yaml
Last active Jun 21, 2018
Home Assistant Lovelace + WiredJS
View configuration.yaml
# In Home Assistant UI, navigate to dev-info page and click on "Try out the new Lovelace UI" (HASS 0.72+)
# Reference the file in your configuration file
- /local/wired-cards.html
# Example entities used in sample ui-lovelacy.yaml below
balloob / experimental-ui.yaml
Last active Jun 18, 2018
Example custom card for the experimental UI in Home Assistant 0.72
View experimental-ui.yaml
- name: Example
- type: 'custom:my-element'
entity_id: input_boolean.switch_ac_kitchen
balloob /
Created May 7, 2018
Basis for a component to prototype bluetooth discovery
"""Basis for a BLE discovery component.
To add to Home Assistant, copy this file to
Add to your configuration.yaml:
balloob / demo.js
Created Aug 1, 2017
Example using home-assistant-js-websocket with Node
View demo.js
const WebSocket = require('ws');
global.WebSocket = WebSocket;
const HAWS = require("home-assistant-js-websocket");
const getWsUrl = haUrl => `ws://${haUrl}/api/websocket`;
HAWS.createConnection(getWsUrl('localhost:8123')).then(conn => {
HAWS.subscribeEntities(conn, logEntities);
balloob / reactstrap.cjs.js
Created Jun 26, 2017
Build output Reactstrap optimizations
View reactstrap.cjs.js
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var React__default = _interopDefault(React);
var PropTypes = _interopDefault(require('prop-types'));
var classNames = _interopDefault(require('classnames'));
balloob / DocxToPdf.ps1
Created Jun 5, 2017 — forked from alexisnomine/DocxToPdf.ps1
Batch convert docx to pdf with powershell
View DocxToPdf.ps1
$Files = Get-ChildItem "$FilePath\*.docx"
$Word = New-Object -ComObject Word.Application
Foreach ($File in $Files) {
balloob /
Last active Aug 23, 2017
WIP library to control Ikea Tradfri
This is the Ikea Tradfri code from @ggravlingen extracted into a lib.
Depends on modified coap-client with dtls support. Build instructions here:
Run with python3 -i IP KEY
Will give you an interactive Python shell:
balloob /
Last active Sep 27, 2018 — forked from pjcozzi/
CLA for Apache 2.0 license

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the Apache 2.0 license; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the Apache 2.0 license; or