Skip to content

Instantly share code, notes, and snippets.

View simonwh's full-sized avatar

Simon Westh Henriksen simonwh

  • Copenhagen, Denmark
  • 06:02 (UTC +02:00)
View GitHub Profile
blueprint:
name: Test play media blueprint
description: 'Test'
domain: automation
input:
media:
name: Media to play on wakeup
description: Media to play
default: []
selector:
blueprint:
name: Wake-up light and music alarm with sunrise effect and increasing volume (RGB version)
description: 'A wake-up light and music alarm with a brightness and color temperature sunrise effect and increasing volume.
Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
@simonwh
simonwh / wakeup_automation.yaml
Last active July 10, 2022 14:02
Wake-up alarm automation
blueprint:
name: Wake-up light and music alarm with sunrise effect and increasing volume
description: 'A wake-up light and music alarm with a brightness and color temperature sunrise effect and increasing volume.
Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
@simonwh
simonwh / eps-hotel.json
Created March 24, 2021 08:39
eps hotel
{
"1418274": {
"property_id": "1418274",
"name": "Ciutat de Barcelona",
"address": {
"line_1": "C/ Princesa, 33-35",
"city": "Barcelona",
"postal_code": "08003",
"country_code": "ES"
},
@simonwh
simonwh / calendar-highlights.json
Last active December 2, 2019 15:09
Frontend endpoints
Calendar highlights for origin/destination combination STO-PAR
GET https://bookcf.tripx.eu/wp-json/tripx/v1/calendar-highlights/STO-PAR
[
{
"startDate": "2016-07-08T00:00:00",
"endDate": "2020-10-31T00:00:00",
"days": [
true,
{
"id": 9048,
"name": "Windsor Florida Hotel",
"stars": 4,
"address": "Rua Ferreira Viana 81 (also 69), Flamengo, Rio De Janeiro, 22210-100",
"city": "Rio De Janeiro",
"postcode": "22210-100",
"countryName": "Brazil",
"countryCode": "BR",
"latitude": -22.92696,
@simonwh
simonwh / .log
Created February 19, 2019 20:58
time="2019-02-19T18:22:49Z" level=info msg="publishing to: https://cec4eegzurwjmez5wf1axjqfkcz9n13o@cloud.weave.works."
<probe> INFO: 2019/02/19 18:22:49.304499 Basic authentication disabled
<probe> INFO: 2019/02/19 18:22:49.309895 command line args: --mode=probe --probe-only=true --probe.docker=true --probe.docker.bridge=docker0 --probe.kubernetes=true https://<elided>@cloud.weave.works.
<probe> INFO: 2019/02/19 18:22:49.310000 probe starting, version 1.10.2, ID 2e22440b0d0e8b52
<probe> WARN: 2019/02/19 18:22:49.342503 Cannot resolve 'scope.weave.local.': dial tcp 172.17.0.1:53: connect: connection refused
<probe> INFO: 2019/02/19 18:22:49.782442 Control connection to cloud.weave.works. starting
<probe> INFO: 2019/02/19 18:22:49.972142 kubernetes: targeting api server https://tripx-rancher-e68e2cc9.hcp.westeurope.azmk8s.io:443
<probe> WARN: 2019/02/19 18:22:50.019399 Error collecting weave status, backing off 10s: Get http://127.0.0.1:6784/report: dial tcp 127.0.0.1:6784: connect: connection refused. If you
@simonwh
simonwh / azureblob.rb
Created April 10, 2018 16:54
Azureblob
# encoding: utf-8
require "logstash/inputs/base"
require "logstash/namespace"
require "azure/storage"
require "base64"
require "securerandom"
# Reads events from Azure Blobs
class LogStash::Inputs::Azureblob < LogStash::Inputs::Base
h2 Bestilling fra NetOil.dk
p Følgende varer er bestilt:
table style="border-collapse: collapse;"
tr
th style="text-align: left; padding-right: 20px;" Antal
th style="padding-right: 20px;" Produktkode
th style="text-align: left;" Produkt
- @line_items.each do |line_item|
{"HotelInfo":{"Name":"Oro Blanco Apartments","Destination":"Tenerife","ImageURL":"http://cf90056aui99.cdnserver.net/tdrz/i/img.php?folder1=destinations&folder2=hotelimages&img=bb4_sizedisplayheight300hotelamtses1tjqfilenamepiscina+2.jpg&w=0&h=0","Stars":2,"Themes":["Familjehotell","Strandhotell"]},"FlightMatrix":{"matrixGenerationTimeField":0,"carriersField":[{"stopsField":[{"combinationsField":[{"legsField":[{"flightsField":[{"departureTimeField":"2014-01-06T17:20:00.0000000+00:00","originTerminalField":null,"arrivalTimeField":"2014-01-06T21:00:00.0000000+00:00","destinationTerminalField":null,"classOfServiceField":null,"codeShareField":null,"changeOfPlaneField":false,"tokenField":null,"passengerFlightDetailsField":null,"carrierField":"VY","flightNumberField":"1877","originField":"CPH","destinationField":"AGP","flightTimeField":220}],"upgradesField":null,"upgradePiecesField":null,"travelTimeField":220,"idField":"500d5589-4257-4fc3-801b-565beceb8258","originField":"CPH","destinationField":"AGP"},{"flightsFiel