Skip to content

Instantly share code, notes, and snippets.

View aircooledcafe's full-sized avatar

Ben Lee aircooledcafe

View GitHub Profile
@aircooledcafe
aircooledcafe / ha_rain_live_activity.md
Created October 15, 2026 17:50
Home Assistant raining live activities example.

Home Assistant raining live activity, that works with a weather station with a rain sensor:

alias: Rain Live Activity
description: Sends different notifications depending on the rain intensity.
triggers:
  - trigger: state
    entity_id: sensor.ws3900a_rain_rate
    not_to:
      - unknown
----------------------------------------------------------------------------------------
:::::::: ::::::::: :::::::::: ::::::::: ::: ::::::::::: :::::::: :::::::::
:+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+:
+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+
+#+ +:+ +#++:++#+ +#++:++# +#++:++#: +#++:++#++: +#+ +#+ +:+ +#++:++#:
+#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+
#+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+# #+#
######## ### ########## ### ### ### ### ### ######## ### ###

First, you need to create a helper.
Settings → Devices & services → Helpers → Create helper → Template → Sensor
Name it 'wet bulb', set its measurement to °C, then paste in the following (you will need to change the sensor names to match those in the respective weather station or room):

{% set temp_entity = 'sensor.alpstuga_air_quality_monitor_temperature' %}
{% set rh_entity = 'sensor.alpstuga_air_quality_monitor_humidity' %}

{% set temp = states(temp_entity) | float(none) %}
{% set rh = states(rh_entity) | float(none) %}
@aircooledcafe
aircooledcafe / terminal_colours.txt
Created December 26, 2025 11:59
Terminal colour escape sequences fro colouring terminal output.
BLACK = '\033[30m'
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
MAGENTA = '\033[35m'
CYAN = '\033[36m'
WHITE = '\033[37m'
GRAY = '\033[90m'
BRED = '\033[91m'

Keybase proof

I hereby claim:

  • I am aircooledcafe on github.
  • I am aircooledcafe (https://keybase.io/aircooledcafe) on keybase.
  • I have a public key ASBYXwxmGtFQxPAi4ljxHhd4vOPbVBx2UWxbTvMfKFBFNAo

To claim this, I am signing this object:

@aircooledcafe
aircooledcafe / aircooledcafe
Created February 2, 2016 10:10
blockchain verification
verifying my blockchain id