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
import os | |
import uuid | |
import datetime | |
import shutil | |
import sys | |
from fitparse import FitFile | |
def extract_activity_start_time(fit_path): | |
"""Extracts the activity start time from a .fit file.""" | |
try: |
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
# copy file to blueprints/automation/homeassistant/tado_window.yaml | |
blueprint: | |
name: Tado Open Window Heating Control | |
description: Pauses the auto control for 15min when an open window is detected in a room. | |
domain: automation | |
input: | |
window_entity: | |
name: Window Sensor | |
description: The window sensor that controls the climate entity. | |
selector: |
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
# ~/.config/fish/config.fish | |
set -x LANG en_US.UTF-8 | |
if status is-interactive | |
# Commands to run in interactive sessions can go here | |
end | |
# load Fish Shell UI Configuration | |
starship init fish | source |
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
// Uses a linear potentiometer to adjust the brightness of an CCT light connected to the arduino. | |
// the darker the light, the warmer the color temperature gets. | |
// The brightness get's adjusted quadratically to the potentiometer value. | |
// This is ideal for a night lamp with fine control in the lower spectrum but the ability to use full brightness at day. | |
#define PIN_WW 5 | |
#define PIN_CW 6 | |
#define PIN_IN A0 | |
#define MAX_BRIGHTNESS 255 | |
#define threshold 10 |
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
/* | |
Sources: | |
https://arduino-projekte.info/funk-sender-433mhz-auslesen-mit-arduino/ | |
https://daniel-ziegler.com/arduino/mikrocontroller/2017/06/16/Funksteckdose-arduino/ | |
also note, that I received protocol 3 or 5 with this script, | |
but the internet suggested to use 4 when sending and only 4 seems to work. | |
How to use: | |
Flash this on your Arduino and hold the button you want to read until you received 4 different values. |
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
#define LED_WW 5 | |
#define LED_CW 6 | |
#define BTN 7 | |
#define BRIGHTNESS_MAX 255 | |
#define TIMEOUT 500 | |
#define TIMEOUT_INFINITY 60000 // 1min | |
#define BRIGHNESS_STEP 1 | |
#define BRIGHNESS_STEP_DURATION 15 | |
#define TEMP_STEP 0.01 |
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
name: Sync | |
'on': | |
schedule: | |
- cron: '0 3 * * *' | |
push: | |
branches: | |
- master | |
jobs: | |
files: | |
name: Files |
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 glob = require("glob"); | |
const path = require("path"); | |
// returns a list of all filepaths in a given directory | |
const readDirRecursiveSync = dir => { | |
return glob.sync(`${dir}/**/*.*`); | |
}; | |
const getThemeAliases = (dir, theme) => { | |
const themeFilesDir = `src/themes/${theme}/${dir}`; |
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 path = require("path"); | |
const aliases = { | |
// required to not break nuxt | |
"@": "src", | |
"@@": ".", | |
// custom aliases | |
"@components": "src/components", | |
} |
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
<script> | |
import RenderHtml from "./RenderHtml.vue"; | |
import FancyButton from "@components/FancyButton.vue"; | |
export default { | |
components: { | |
FancyButton, | |
}, | |
...RenderHtml, | |
}; | |
</script> |
NewerOlder