Skip to content

Instantly share code, notes, and snippets.

View brianhanifin's full-sized avatar
💭
Happy to be contributing!

Brian Hanifin brianhanifin

💭
Happy to be contributing!
View GitHub Profile
@tetele
tetele / README.md
Last active May 5, 2024 08:17
ESPHome config - Raspiaudio Muse Luxe as a voice assistant satellite in Home Assistant

Introduction

The purpose of this ESPHome config is to be able to use the Raspiaudio Muse Luxe as a voice assistant satellite in Home Assistant.

Features

  • wake word, push to talk and continuous conversation support
  • response playback
  • service exposed in HA to start and stop the voice assistant from another device/trigger
  • visual feedback of the recording/success/error status via the Luxe's onboard LED
@brianhanifin
brianhanifin / add_time()
Last active January 19, 2020 05:01
HASS Jinja2 Date/Time Macros
{% macro add_time(time, add_minutes) %}
{% if time|lower != 'unavailable' %}
{% set time = time.split(':') %}
{% set hour = time[0]|int %}
{% set minutes = time[1]|int %}
{% if (minutes + add_minutes) < 60 %}
{{ "%0.02d:%0.02d"|format(hour, minutes + add_minutes) }}
{% else %}
{{ "%0.02d:%0.02d"|format(hour + 1, (minutes + add_minutes) - 60) }}
{% endif %}
@brianhanifin
brianhanifin / csv entity state + attributes
Last active January 18, 2020 04:14
HASS-CLI Snippets
hass-cli --columns=ENTITY="entity_id,state,attributes[duration],attributes[remaining]" --no-headers --table-format tsv state list ^timer \
| grep active \
| sed -e 's/timer.//g' \
| sed -e 's/\<active\>//g' \
| sed -e 's/\t/,/g' \
| sed -e 's/,,/,/g' \
| sed -e 's/ //g' \
www/data/active_timers_snapshot.csv
@whiskerz007
whiskerz007 / gist:53c6aa5d624154bacbbc54880e1e3b2a
Last active January 3, 2024 00:08
How to setup a community version of Proxmox VE 5.x-6.x
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
apt-get update
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
apt-get update
# Remove nag
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script
@frenck
frenck / hassio_ubuntu_install_commands.sh
Last active February 1, 2023 05:38
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
Unbuntu is no longer support by the Home Assistant project.
The installation commands previous listed here, are not up 2 date, not recommended, not supported and, therefore, removed.