Skip to content

Instantly share code, notes, and snippets.

View hi94740's full-sized avatar

hi94740 hi94740

View GitHub Profile
@hi94740
hi94740 / vrchat-ha.user.js
Last active May 9, 2026 11:00
Open VRChat user in Home Assistant. Intended to use with the VRChat integration for Home Assistant.
// ==UserScript==
// @name Open VRChat user in Home Assistant
// @author hi94740
// @version 1.0.0
// @description Intended to use with the VRChat integration for Home Assistant.
// @match https://vrchat.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=vrchat.com
// @require https://cdn.jsdelivr.net/npm/lodash@4.18.1/lodash.min.js
// @connect homeassistant.local
// @connect localhost
@hi94740
hi94740 / 实体状态变化通知.yaml
Created May 7, 2026 08:49
Home Assistant 实体状态变化通知蓝图
blueprint:
name: 实体状态变化通知
description: 当实体状态变化时给移动App发送通知。
domain: automation
input:
watched_entities:
name: 监控的实体
description: 选择您想要监控的实体。
selector:
entity:
@hi94740
hi94740 / Scriptable-chainWidget.js
Last active February 17, 2024 11:04
Chainable widget API for Scriptable App.
// Copy the function below to use in your scripts.
function createWidget() {
const widget = new ListWidget()
const wrap = (view, isWidget) => {
let wrapped
const wrapWith = (key, exec) => [key, (...args) => (exec(...args), wrapped)]
wrapped = Object.fromEntries(Object.keys(view).map(key => {
if (typeof view[key] === "function") {
if (key.startsWith("add")) return wrapWith(key, (...args) => {
let cb