Skip to content

Instantly share code, notes, and snippets.

💭
Make automation great again

Fabio Manganiello BlackLight

💭
Make automation great again
Block or report user

Report or block BlackLight

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wealth-inequality-fixed.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View wealth-inequality.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View wealth-inequality.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View assistant_music_ctrl_examples.yaml
# Play the music when you say "play the music".
# Note the regex support: this hook will be triggered whether you
# say "play the music" or "play music".
event.hook.PlayMusicAssistantCommand:
if:
type: platypush.message.event.assistant.SpeechRecognizedEvent
phrase: "play (the)? music"
then:
- action: music.mpd.play
View ir_remote_music_conf.yaml
event.hook.OnSensorData:
if:
type: platypush.message.event.sensor.SensorDataChangeEvent
then:
- if ${data.get('ir') == 'code1'}:
- action: music.mpd.play
- if ${data.get('ir') == 'code2'}:
- action: music.mpd.pause
- if ${data.get('ir') == 'code3'}:
- action: music.mpd.stop
@BlackLight
BlackLight / IRrecv.ino
Last active Oct 22, 2019
Infrared receiver sketch for Arduino
View IRrecv.ino
#include <IRremote.h>
#define IR_REPEAT 0xFFFFFFFF
const int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
decode_results results;
unsigned int latest_value = 0;
View event_hook.yaml
event.hook.OnGasAboveThreshold:
if:
type: platypush.message.event.http.hook.WebhookEvent
hook: gas_alert
then:
- if ${data.get('state') != 'ok'}:
-
action: pushbullet.send_note
args:
title: ${data.get('title')}
View home.yaml
event.hook.OnHomePushData:
if:
type: platypush.message.event.pushbullet.PushbulletEvent
push_type: note
then:
- if ${body.startswith('HOME#') and body.split('HOME#')[1] == '1'}:
# Turn on the lights
- action: light.hue.on
# Say a welcome message
View fit.yaml
backend.google.fit:
poll_seconds: 1800
data_sources:
- derived:com.google.weight:com.google.android.gms:merge_weight
- derived:com.google.calories.bmr:com.google.android.gms:merged
- derived:com.google.distance.delta:com.google.android.gms:platform_distance_delta
- derived:com.google.speed:com.google.android.gms:merge_speed
- derived:com.google.step_count.delta:com.google.android.gms:merge_step_deltas
- derived:com.google.heart_rate.bpm:com.google.android.gms:merge_heart_rate_bpm
- derived:com.google.calories.expended:com.google.android.gms:from_activities
View fit.sql
--
-- tmp_fit_data table setup
--
drop sequence if exists tmp_fit_data_seq cascade;
create sequence tmp_fit_data_seq;
drop table if exists tmp_fit_data cascade;
create table tmp_fit_data(
id integer not null default nextval('tmp_fit_data_seq'),
You can’t perform that action at this time.