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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
import { useCallback } from 'react'; | |
type ClipboardItemData = { | |
type: string; | |
data: string; | |
}; |
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
blueprint: | |
name: Fan Temperature | |
description: | | |
Speed up and slow down ceiling fans, as it gets hotter and colder. | |
domain: automation | |
source_url: https://gist.github.com/manix84/c16a8e46d10423e4354b5e862facc907 | |
author: Manix84 | |
input: | |
fan_entity_ids: | |
name: Fans |
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
blueprint: | |
name: Hue Remote Lights with Automation (ZHA Integration) | |
description: | | |
An automation for Hue removes, which has brightness buttons (100%, 66%, 33%, 0%), and long presses turns off the automations. | |
domain: automation | |
source_url: https://gist.github.com/manix84/8c94b97285e82c594aac3c1372f40660 | |
author: Manix84 | |
input: | |
dimmer_device_id: | |
name: Dimmer Remote |
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
blueprint: | |
name: Hue Remote Lights (Philips Hue Integration) | |
description: | | |
An automation for Hue remotes, which has brightness buttons (100%, 66%, 33%, 0%). | |
domain: automation | |
source_url: https://gist.github.com/manix84/be2b758caa6fa518fa895ce7265dc85c | |
author: Manix84 | |
input: | |
dimmer_device_id: | |
name: Dimmer Remote Device |
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
blueprint: | |
name: Tablet Themes (Lumins) | |
description: | | |
Use Browser Mod to change the theme used on tablets around the house, based on the brightness of the local sensor. | |
domain: automation | |
source_url: https://gist.github.com/manix84/761a2633fb555041e51a5bea53778fc7 | |
author: Manix84 | |
input: | |
browser_device_id: | |
name: Browser Device |
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
blueprint: | |
name: Blinds automation | |
description: | | |
Open blinds at sunrise or specified time, which-ever comes later. | |
Close blinds at sunset or specified time, which-ever comes earlier. | |
domain: automation | |
source_url: https://gist.github.com/manix84/c1b39dfb62d5052664c8fee0d29b3bd3 | |
author: Manix84 | |
input: | |
blinds_entity_ids: |
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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
import { useEffect, useState } from "react"; | |
const MINIMUM_VERTICAL_MOVEMENT_PX = 100; | |
const MINIMUM_HORIZONTAL_MOVEMENT_PX = 10; | |
const STORED_GUESSES = 11; // More than half in one direction will cause a switch |
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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
import { useCallback, useState } from "react"; | |
export const useTextResize = () => { | |
const [originalFontSize, setOriginalFontSize] = useState<number>(null); | |
const [originalLineHeight, setOriginalLineHeight] = useState<number>(null); |
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
/** | |
This code is licensed under the terms of the MIT license | |
*/ | |
import { useCallback, useEffect, useRef, useState } from "react"; | |
export const useTimeout = ( | |
callback: Function, | |
delay: number /** milliseconds */ | |
) => { | |
const timeoutRef = useRef(null); |
NewerOlder