Skip to content

Instantly share code, notes, and snippets.

views:
- title: Home
sections:
- type: grid
cards:
- show_current: true
show_forecast: true
type: weather-forecast
entity: weather.tomorrow_io_home_daily
forecast_type: hourly
@schettada
schettada / ha-template.txt
Created June 19, 2024 16:40
Home-Assistant Template Examples
{{ (expand('light.all_lights')
| selectattr('state', 'eq', 'on')
| sort(attribute='last_changed', reverse = True)
| map(attribute='name') | list)[0]}}
{{ (expand('light.all_lights')
| selectattr('state', 'eq', 'off')
| sort(attribute='last_changed', reverse = True)
| map(attribute='name') | list)[0]}}
@schettada
schettada / unifi.txt
Last active April 16, 2024 17:26
Self-Hosted Unifi Controller Setup
---------------------------- Installation Steps ----------------------------
https://help.ui.com/hc/en-us/articles/220066768-Updating-and-Installing-Self-Hosted-UniFi-Network-Servers-Linux
---------------------------- Use Custom Cert ----------------------------
# Get the certificate from LetsEncrypt
/home/ubuntu/certbot-auto renew --quiet --no-self-upgrade
# Convert cert to PKCS #12 format
openssl pkcs12 -export -in /etc/letsencrypt/live/kaisevps2.kaise123.com/cert.pem -inkey /etc/letsencrypt/live/kaisevps2.kaise123.com/privkey.pem -out /home/ubuntu/cert.p12 -name unifi -CAfile /etc/letsencrypt/live/kaisevps2.kaise123.com$