Skip to content

Instantly share code, notes, and snippets.

@danodemano
danodemano / nodered-timestamp-properties.js
Created November 29, 2019 01:19 — forked from mrizvic/nodered-timestamp-properties.js
Function for node-red which determines properties like holiday, business day, weekend, etc at the moment when incoming message is received. It contains Slovenian conditions to determine those properties.
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* github.com/mrizvic wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. M.Rizvic
* ----------------------------------------------------------------------------
## This function will pass incoming message to multiple outputs based on following conditions:
#!/usr/bin/python
import praw
import pdb
import re
import os
import sys
import MySQLdb
import json
import base64
import zlib
views:
- icon: 'mdi:home-variant'
cards:
- card:
show_header_toggle: false
type: entities
entities:
- group_config:
secondary_info: last-changed
type: 'custom:fold-entity-row'