This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import logging | |
import getpass | |
import argparse | |
import paho.mqtt.client as mqtt # paho-mqtt | |
payloads = { | |
"homeassistant/device_automation/B0C1/%MQTT_PREFIX%/config": { | |
"automation_type":"trigger", | |
"topic": "%MQTT_PREFIX%/buttons/0/click/1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def startup(): | |
global matrix | |
matrix = load_large_matrix() | |
# then you would | |
from yourapp import matrix |