I hereby claim:
- I am balloob on github.
- I am balloob (https://keybase.io/balloob) on keybase.
- I have a public key whose fingerprint is BBAD 245E 7174 B2E5 AD56 CBFB 322A D3E1 BB02 7C65
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| from multiprocessing.dummy import Pool | |
| import sys | |
| import time | |
| from homeassistant import remote | |
| # Docs: remote.API(host, [password], [port], [use_ssl]) | |
| api = remote.API('127.0.0.1') | |
| start_time = time.time() |
| """ | |
| Component to track where spectacles are being sold. | |
| To install: | |
| - Install Home Assistant (duh): https://home-assistant.io | |
| - Add this file as <config dir>/custom_components/sensor/spectacles.py | |
| - Add to configuration.yaml: | |
| sensor: | |
| platform: spectacles |
| class AsyncFileHandler(): | |
| def __init__(self, loop, handler): | |
| """Initialize async logging file handle.""" | |
| self.handler = handler | |
| self.loop = loop | |
| self._queue = asyncio.Queue(loop=loop) | |
| self._thread = threading.Thread(target=self._process) | |
| def start_thread(self): | |
| """Start thread for processing.""" |
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
| """ | |
| This is the Ikea Tradfri code from @ggravlingen extracted into a lib. | |
| https://github.com/ggravlingen/home-assistant/blob/master/custom_components/light/ikeatradfri.py | |
| Depends on modified coap-client with dtls support. Build instructions here: | |
| https://community.home-assistant.io/t/ikea-tradfri-gateway-zigbee-very-basic-working-implementation/14788/19?u=balloob | |
| Run with python3 -i pytradfri.py IP KEY | |
| Will give you an interactive Python shell: |
| Param( | |
| [Parameter(Mandatory=$True)] | |
| [string]$FilePath | |
| ) | |
| $Files = Get-ChildItem "$FilePath\*.docx" | |
| $Word = New-Object -ComObject Word.Application | |
| Foreach ($File in $Files) { |
| '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')); |
| 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); | |
| }); |
| """Basis for a BLE discovery component. | |
| To add to Home Assistant, copy this file to | |
| <config>/custom_components/ble_discovery.py | |
| Add to your configuration.yaml: | |
| ``` | |
| ble_discovery: |