Skip to content

Instantly share code, notes, and snippets.

@hlchanad
hlchanad / Smart Cat Scale Note.md
Last active September 25, 2025 12:49
Smart Cat Scale Note

Smart Cat Scale Notes

Table of Contents

(TODO)

Background

I would like to know the weight of the cat frequently without bothering myself to weigh everyday. I would like to create a smart cat scale and integrate with my Home Assistant.

alias: Announce with speakers
sequence:
- if:
- condition: state
entity_id: input_boolean.silence_mode
state: "on"
- condition: template
value_template: "{{ not force_announcement }}"
then:
- stop: Silence Mode is on. Skipping the announcement.
blueprint:
name: Turn off Air Conditioner when Timer is finished
description: As described in title
domain: automation
input:
timer_id:
name: Timer
selector:
@hlchanad
hlchanad / scripts.sh
Created October 25, 2020 05:28
EC2 Ubuntu 20.04 start-up scripts for Docker and CodeDeploy Agent
#!/bin/bash
apt-get update
apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
@hlchanad
hlchanad / code-pipeline-job-invalidation.js
Created October 2, 2020 17:01
Lambda handler for CodePipeline job to invalidate specified S3 bucket related CloudFront
const Q = require('q');
const aws = require('aws-sdk');
aws.config.setPromisesDependency(Q.Promise);
const cloudfront = new aws.CloudFront();
const codepipeline = new aws.CodePipeline();
exports.handler = async function (event, context) {
console.log('Event: ' + JSON.stringify(event, null, 2));