Skip to content

Instantly share code, notes, and snippets.

View tathamoddie's full-sized avatar

Tatham Oddie tathamoddie

View GitHub Profile
# Used with ESPHome. See https://tatham.blog/2020/08/30/esphome-nothing-to-firmware-in-30-minutes/
## Commom pieces of text we'll re-use later
# (makes it easier to copy and paste all of this code for another value later,
# because you only have to set the new name at the top of the file)
substitutions:
device_name: air_monitor_indoor
friendly_name: Air Monitor Indoor
area: Indoor
substitutions:
device_name: demo_deepsleep
friendly_name: Demo Deep Sleep
## Board config
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
alias: Hot plants
trigger:
- platform: sun
event: sunset
offset: '-02:00:00'
condition:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.south_yarra_temp_max_0
@tathamoddie
tathamoddie / lightning.yaml
Last active January 5, 2021 22:57
AS3935 and ESPHome config
substitutions:
device_name: lightning_detector
friendly_name: Lightning
## Board config
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
@tathamoddie
tathamoddie / demo2.yaml
Created August 30, 2020 05:23
ESPHome demo config for M5Stack Atom Lite
substitutions:
device_name: demo2
friendly_name: Demo 2
## Boilerplate
esphome:
name: ${device_name}
platform: ESP32
board: m5stack-core-esp32
- alias: Notify when gate buzzing
trigger:
- entity_id: binary_sensor.gate_buzzer
from: 'off'
platform: state
to: 'on'
condition: []
action:
- service: notify.everyone
data:
[CmdletBinding()]
param
(
[Parameter()]
[String[]]
$StartingUsers,
[Parameter()]
[bool]
$EnabledUsersOnly = $true
@tathamoddie
tathamoddie / consent-self-test.ps1
Created January 29, 2018 20:20
AAD app consent self-test
@tathamoddie
tathamoddie / configuration.xml
Created March 22, 2017 06:25
Office Deployment Tool channel configuration
<!-- Office 365 client configuration file sample. To be used for Office 365 ProPlus 2016 apps,
Office 365 Business 2016 apps, Project Pro for Office 365 and Visio Pro for Office 365.
For detailed information regarding configuration options visit: http://aka.ms/ODT.
To use the configuration file be sure to remove the comments
For Office 365 client apps (verion 2013) you will need to use the 2013 version of the
Office Deployment Tool which can be downloaded from http://aka.ms/ODT2013
The following sample allows you to download and install Office 365 ProPlus 2016 apps
@tathamoddie
tathamoddie / Migrate-ActiveAcpUsers.ps1
Created October 3, 2016 13:52
Skype for Business: migrate only active ACP users to the Microsoft Bridge
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$True)]
[PSCredential]$Credential,
[int]$BatchSize = 200
)
Import-Module 'C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector'
$skypeSession = New-CsOnlineSession -Credential $cred