Skip to content

Instantly share code, notes, and snippets.

@holblin
holblin / ios_sleep_data_receiver.yaml
Created April 10, 2024 23:52
IOS sleep data receiver
blueprint:
name: IOS Sleep data receiver
description: >-
A script that receive data for IOS about sleep bedtime.
domain: script
input:
next_alarm:
name: Next alarm input
description: Datetime input helper to save the next alarm
selector:
@holblin
holblin / HA-script-iphoneSleepDataReceiver.yaml
Created March 20, 2024 16:56
HA script for receiving IPhone sleep data
alias: IPhone sleep alarm data receiver
sequence:
- variables:
templateResult: >
{# INPUTS from IOS #}
{# This block is not used yet but I beleive we should pass them #}
{% set allowsSnooze = true %}
{% set repeats = true %}
{# This is what I currently use which come from IOS #}
<?php
$admin = ($_SERVER['REMOTE_ADDR'] == '127.0.0.1' || $_SERVER['REMOTE_ADDR'] == '::1') ? true : false;
// Page créé par Shepard [Fabian Pijcke] <Shepard8|at|laposte|point|net>
// Arno Esterhuizen <arno.esterhuizen|at|gmail|point|com>
// et Romain Bourdon <romain|at|anaska|point|com>
// Nouveau design par Alex-D [Alexandre Demode]
//
// icônes par Mark James <http://www.famfamfam.com/lab/icons/silk/>