This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require("path"); | |
const fs = require("fs"); | |
const ICON_PACKAGE_PATH = path.resolve("./node_modules/@mdi/svg/"); | |
const META_PATH = path.resolve(ICON_PACKAGE_PATH, "meta.json"); | |
const ICON_PATH = path.resolve(ICON_PACKAGE_PATH, "svg"); | |
// Print icons + sizes to create sizes.json | |
// const getPath = (icon) => { | |
// const svg = fs.readFileSync(`${ICON_PATH}/${icon}.svg`, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Config flow to connect with Home Assistant.""" | |
import logging | |
import voluptuous as vol | |
from homeassistant.helpers import config_entry_oauth2_flow | |
from .const import DOMAIN | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EntityRegistryDisabledHandler: | |
"""Handler to handle when entities related to config entries updating disabled_by.""" | |
RELOAD_AFTER_UPDATE_DELAY = 30 | |
def __init__(self, hass: HomeAssistant) -> None: | |
"""Initialize the handler.""" | |
self.hass = hass | |
self.registry: Optional[entity_registry.EntityRegistry] = None | |
self.changed: Set[str] = set() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/homeassistant/components/unifi/config_flow.py b/homeassistant/components/unifi/config_flow.py | |
index e5a8965df..06751ed6e 100644 | |
--- a/homeassistant/components/unifi/config_flow.py | |
+++ b/homeassistant/components/unifi/config_flow.py | |
@@ -2,6 +2,7 @@ | |
import voluptuous as vol | |
from homeassistant import config_entries | |
+from homeassistant.core import callback | |
from homeassistant.const import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
frontend: | |
extra_html_url: | |
- /local/wired-cards.html | |
# Example entities used in sample ui-lovelacy.yaml below | |
input_boolean: | |
switch_ac_kitchen: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
views: | |
- name: Example | |
cards: | |
- type: 'custom:my-element' | |
entity_id: input_boolean.switch_ac_kitchen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[Parameter(Mandatory=$True)] | |
[string]$FilePath | |
) | |
$Files = Get-ChildItem "$FilePath\*.docx" | |
$Word = New-Object -ComObject Word.Application | |
Foreach ($File in $Files) { |