Skip to content

Instantly share code, notes, and snippets.

@Sennevds
Sennevds / system_sensor.py
Created July 31, 2019 10:24
Send Raspberry PI data to mqtt(with Home Assistant discovery support)
#!/usr/bin/env python3
from subprocess import check_output
from re import findall
import psutil
import sys
import os
import threading, time, signal
from datetime import timedelta
import datetime as dt
import paho.mqtt.client as mqtt
import os
import sys
from matrix_lite import sensors
from matrix_lite import led
import threading, time, signal
from datetime import timedelta
import paho.mqtt.client as mqtt
import json
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;

Description

Simple Dashing widget to countdown until a certain moment. Flashes the widget when finished.

##Usage

To use this widget, copy countdown.html, countdown.coffee, and countdown.scss into the /widgets/countdown directory.

To include the widget in a dashboard, add the following snippet to the dashboard layout file: