Skip to content

Instantly share code, notes, and snippets.

View TheSimpleZ's full-sized avatar
⛑️

Zrean Tofiq TheSimpleZ

⛑️
View GitHub Profile
@TheSimpleZ
TheSimpleZ / low-toner-level-detection-notification-for-all-IPP-printers.yaml Home Assistant Blueprint: Low toner level detection & notification for all IPP printers
blueprint:
name: Low toner level detection & notification for all IPP printers
description: Regularly test all sensors with 'toner' marker_type for crossing
a certain toner level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Toner warning level threshold
description: Toner sensors below threshold are assumed to be low-toner.
default: 20
@TheSimpleZ
TheSimpleZ / gist:a176dcf0ebf2074c9b2fe0656f05121a
Last active March 12, 2021 18:15
Set all authors as assignees to a GitHub PR in GitHub Actions
- uses: actions/github-script@v3
id: set-result
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script: |
const prQuery = {
pull_number: process.env.PULL_REQUEST_NUMBER,
issue_number: process.env.PULL_REQUEST_NUMBER,
owner: context.repo.owner,