This file contains 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 fz = require('zigbee-herdsman-converters/converters/fromZigbee'); | |
const tz = require('zigbee-herdsman-converters/converters/toZigbee'); | |
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const reporting = require('zigbee-herdsman-converters/lib/reporting'); | |
const ota = require('zigbee-herdsman-converters/lib/ota'); | |
const globalStore = require('zigbee-herdsman-converters/lib/store'); | |
const utils = require('zigbee-herdsman-converters/lib/utils'); | |
const e = exposes.presets; | |
const ea = exposes.access; |
This file contains 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
blueprint: | |
name: Zigbee2MQTT Hue Wall Switch Module | |
description: 'Controller automation for executing any kind of action triggered by a Philips Hue Wall Switch Module.' | |
domain: automation | |
input: | |
switch: | |
name: Switch | |
description: The action sensor of the controller to use for the automation. | |
default: '' |
This file contains 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
# First get your user id by entering your full @user@domain into | |
# https://prouser123.me/mastodon-userid-lookup/ | |
# Add the rest sensor into your configuration.yaml, replacing bracketed values as appropriate | |
sensor: | |
... | |
- platform: rest | |
resource: https://[YOUR MASTODON SERVER]/api/v1/accounts/[YOUR USER ID] | |
name: "[YOUR NAME] follower count" |
This file contains 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
alias: Post Notification | |
description: "" | |
trigger: | |
- platform: state | |
entity_id: | |
- binary_sensor.z2maqarareed01_contact | |
to: "on" | |
from: "off" | |
condition: | |
- condition: template |
This file contains 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
// | |
// DismissableView.swift | |
// | |
// Created by Andrew Jackson on 05/09/2020. | |
// | |
import SwiftUI | |
struct DismissableView<Content: View>: View { |
This file contains 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
binary_sensor: | |
- platform: template | |
sensors: | |
transmission_all_complete: | |
friendly_name: Transmission All Complete | |
value_template: "{{ states('sensor.transmission_total_torrents')|float == states('sensor.transmission_completed_torrents')|float }}" |
This file contains 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
{ | |
"if": { | |
"prefix": "if", | |
"body": "if (${1:condition}) {\n\t$0\n}\n", | |
"description": "An if statement" | |
}, | |
"for": { | |
"prefix": "for", | |
"body": "for my \\$$1 (@\\$$2) {\n\t$0\n}\n", | |
"description": "A for statement" |
This file contains 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
{ | |
"Slim Log Error": { | |
"scope": "perl", | |
"prefix": "slimlogerror", | |
"body": [ | |
"\\$log->error(\"$1\");" | |
], | |
"description": "Slim Error Log" | |
}, | |
"Slim Setting Title": { |
This file contains 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
... | |
switch: | |
- platform: command_line | |
switches: | |
portainer_transmission: | |
command_on: "/bin/bash /config/portainer_transmission_start.sh" | |
command_off: "/bin/bash /config/portainer_transmission_stop.sh" | |
command_state: "/bin/bash /config/portainer_transmission_state.sh" | |
friendly_name: "Portainer Transmission" | |
... |
This file contains 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
extension Sequence where Iterator.Element: Hashable { | |
func unique() -> [Iterator.Element] { | |
// Usage | |
// print(array.unique()) // prints: [1, 2, 3] | |
var seen: Set<Iterator.Element> = [] | |
return filter { seen.insert($0).inserted } | |
} | |
} | |