-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Expose buttons to HA - HA Switch to control the transition - Icons are not reloaded if its the same as before closes #26
- Loading branch information
Showing
12 changed files
with
407 additions
and
137 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
#include <Arduino.h> | ||
#include "Dictionary.h" | ||
|
||
// MQTT | ||
const char StatsTopic[] PROGMEM = {"stats"}; | ||
const char ButtonLeftTopic[] PROGMEM = {"stats/buttonLeft"}; | ||
const char ButtonSelectTopic[] PROGMEM = {"stats/buttonSelect"}; | ||
const char ButtonRightTopic[] PROGMEM = {"stats/buttonRight"}; | ||
|
||
// Generic | ||
const char State0[] PROGMEM = {"0"}; | ||
const char State1[] PROGMEM = {"1"}; | ||
|
||
// HA | ||
const char HAmanufacturer[] PROGMEM = {"Blueforcer"}; | ||
const char HAmodel[] PROGMEM = {"AWTRIX Light"}; | ||
const char HAmatID[] PROGMEM = {"%s_mat"}; | ||
const char HAmatIcon[] PROGMEM = {"mdi:lightbulb"}; | ||
const char HAmatName[] PROGMEM = {"Matrix"}; | ||
const char HAbriID[] PROGMEM = {"%s_bri"}; | ||
const char HAbriIcon[] PROGMEM = {"mdi:brightness-auto"}; | ||
const char HAbriName[] PROGMEM = {"Brightness mode"}; | ||
const char HAbriOptions[] PROGMEM = {"Manual;Auto"}; | ||
|
||
const char HAbtnaID[] PROGMEM = {"%s_btna"}; | ||
const char HAbtnaIcon[] PROGMEM = {"mdi:bell-off"}; | ||
const char HAbtnaName[] PROGMEM = {"Dismiss notification"}; | ||
|
||
const char HAbtnbID[] PROGMEM = {"%s_btnb"}; | ||
const char HAbtnbIcon[] PROGMEM = {"mdi:arrow-right-bold"}; | ||
const char HAbtnbName[] PROGMEM = {"Next app"}; | ||
|
||
const char HAbtncID[] PROGMEM = {"%s_btnc"}; | ||
const char HAbtncIcon[] PROGMEM = {"mdi:arrow-left-bold"}; | ||
const char HAbtncName[] PROGMEM = {"Previous app"}; | ||
|
||
const char HAappID[] PROGMEM = {"%s_app"}; | ||
const char HAappIcon[] PROGMEM = {"mdi:apps"}; | ||
const char HAappName[] PROGMEM = {"Current app"}; | ||
|
||
const char HAtempID[] PROGMEM = {"%s_temp"}; | ||
const char HAtempIcon[] PROGMEM = {"mdi:thermometer"}; | ||
const char HAtempName[] PROGMEM = {"Temperature"}; | ||
const char HAtempClass[] PROGMEM = {"temperature"}; | ||
const char HAtempUnit[] PROGMEM = {"°C"}; | ||
|
||
const char HAhumID[] PROGMEM = {"%s_hum"}; | ||
const char HAhumIcon[] PROGMEM = {"mdi:water-percent"}; | ||
const char HAhumName[] PROGMEM = {"Humidity"}; | ||
const char HAhumClass[] PROGMEM = {"humidity"}; | ||
const char HAhumUnit[] PROGMEM = {"%"}; | ||
|
||
const char HAbatID[] PROGMEM = {"%s_bat"}; | ||
const char HAbatIcon[] PROGMEM = {"mdi:battery-90"}; | ||
const char HAbatName[] PROGMEM = {"Battery"}; | ||
const char HAbatClass[] PROGMEM = {"battery"}; | ||
const char HAbatUnit[] PROGMEM = {"%"}; | ||
|
||
const char HAluxID[] PROGMEM = {"%s_lux"}; | ||
const char HAluxIcon[] PROGMEM = {"mdi:sun-wireless"}; | ||
const char HAluxName[] PROGMEM = {"Illuminance"}; | ||
const char HAluxClass[] PROGMEM = {"illuminance"}; | ||
const char HAluxUnit[] PROGMEM = {"lx"}; | ||
|
||
const char HAverID[] PROGMEM = {"%s_ver"}; | ||
const char HAverName[] PROGMEM = {"Version"}; | ||
|
||
const char HAtransID[] PROGMEM = {"%s_tra"}; | ||
const char HAtransName[] PROGMEM = {"Transition"}; | ||
const char HAtransIcon[] PROGMEM = {"mdi:swap-vertical"}; | ||
|
||
const char HAsigID[] PROGMEM = {"%s_sig"}; | ||
const char HAsigIcon[] PROGMEM = {"mdi:sun-wireless"}; | ||
const char HAsigName[] PROGMEM = {"WiFi strength"}; | ||
const char HAsigClass[] PROGMEM = {"signal_strength"}; | ||
const char HAsigUnit[] PROGMEM = {"dB"}; | ||
|
||
const char HAupID[] PROGMEM = {"%s_up"}; | ||
const char HAupName[] PROGMEM = {"Uptime"}; | ||
const char HAupClass[] PROGMEM = {"duration"}; | ||
|
||
const char HAbtnLID[] PROGMEM = {"%s_btnL"}; | ||
const char HAbtnLName[] PROGMEM = {"Button left"}; | ||
|
||
const char HAbtnMID[] PROGMEM = {"%s_btnM"}; | ||
const char HAbtnMName[] PROGMEM = {"Button select"}; | ||
|
||
const char HAbtnRID[] PROGMEM = {"%s_btnR"}; | ||
const char HAbtnRName[] PROGMEM = {"Button right"}; | ||
|
||
const char HAramRID[] PROGMEM = {"%s_ram"}; | ||
const char HAramIcon[] PROGMEM = {"mdi:application-cog"}; | ||
const char HAramName[] PROGMEM = {"Free ram"}; | ||
const char HAramClass[] PROGMEM = {"data_size"}; | ||
const char HAramUnit[] PROGMEM = {"B"}; | ||
|
||
// JSON properites | ||
const char BatKey[] PROGMEM = {"bat"}; | ||
const char BatRawKey[] PROGMEM = {"bat_raw"}; | ||
const char LuxKey[] PROGMEM = {"lux"}; | ||
const char LDRRawKey[] PROGMEM = {"ldr_raw"}; | ||
const char BrightnessKey[] PROGMEM = {"bri"}; | ||
const char TempKey[] PROGMEM = {"temp"}; | ||
const char HumKey[] PROGMEM = {"hum"}; | ||
const char UpTimeKey[] PROGMEM = {"uptime"}; | ||
const char SignalStrengthKey[] PROGMEM = {"wifi_signal"}; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
#ifndef DICTIONARY_H | ||
#define DICTIONARY_H | ||
|
||
// MQTT | ||
extern const char StatsTopic[]; | ||
extern const char ButtonLeftTopic[]; | ||
extern const char ButtonSelectTopic[]; | ||
extern const char ButtonRightTopic[]; | ||
|
||
// Generic | ||
extern const char State0[]; | ||
extern const char State1[]; | ||
|
||
// HA | ||
extern const char HAmanufacturer[]; | ||
extern const char HAmodel[]; | ||
extern const char HAmatID[]; | ||
extern const char HAmatIcon[]; | ||
extern const char HAmatName[]; | ||
extern const char HAbriID[]; | ||
extern const char HAbriIcon[]; | ||
extern const char HAbriName[]; | ||
extern const char HAbriOptions[]; | ||
|
||
extern const char HAbtnaID[]; | ||
extern const char HAbtnaIcon[]; | ||
extern const char HAbtnaName[]; | ||
|
||
extern const char HAbtnbID[]; | ||
extern const char HAbtnbIcon[]; | ||
extern const char HAbtnbName[]; | ||
|
||
extern const char HAbtncID[]; | ||
extern const char HAbtncIcon[]; | ||
extern const char HAbtncName[]; | ||
|
||
extern const char HAappID[]; | ||
extern const char HAappIcon[]; | ||
extern const char HAappName[]; | ||
|
||
extern const char HAtempID[]; | ||
extern const char HAtempIcon[]; | ||
extern const char HAtempName[]; | ||
extern const char HAtempClass[]; | ||
extern const char HAtempUnit[]; | ||
|
||
extern const char HAhumID[]; | ||
extern const char HAhumIcon[]; | ||
extern const char HAhumName[]; | ||
extern const char HAhumClass[]; | ||
extern const char HAhumUnit[]; | ||
|
||
extern const char HAbatID[]; | ||
extern const char HAbatIcon[]; | ||
extern const char HAbatName[]; | ||
extern const char HAbatClass[]; | ||
extern const char HAbatUnit[]; | ||
|
||
extern const char HAluxID[]; | ||
extern const char HAluxIcon[]; | ||
extern const char HAluxName[]; | ||
extern const char HAluxClass[]; | ||
extern const char HAluxUnit[]; | ||
|
||
extern const char HAverID[]; | ||
extern const char HAverName[]; | ||
|
||
extern const char HAsigID[]; | ||
extern const char HAsigIcon[]; | ||
extern const char HAsigName[]; | ||
extern const char HAsigClass[]; | ||
extern const char HAsigUnit[]; | ||
|
||
extern const char HAupID[]; | ||
extern const char HAupName[]; | ||
extern const char HAupClass[]; | ||
|
||
extern const char HAtransID[]; | ||
extern const char HAtransName[]; | ||
extern const char HAtransIcon[]; | ||
|
||
extern const char HAbtnLID[]; | ||
extern const char HAbtnLName[]; | ||
|
||
extern const char HAbtnMID[]; | ||
extern const char HAbtnMName[]; | ||
|
||
extern const char HAbtnRID[]; | ||
extern const char HAbtnRName[]; | ||
|
||
extern const char HAramRID[]; | ||
extern const char HAramIcon[]; | ||
extern const char HAramName[]; | ||
extern const char HAramClass[]; | ||
extern const char HAramUnit[]; | ||
|
||
// JSON properites | ||
extern const char BatKey[]; | ||
extern const char BatRawKey[]; | ||
extern const char LuxKey[]; | ||
extern const char LDRRawKey[]; | ||
extern const char BrightnessKey[]; | ||
extern const char TempKey[]; | ||
extern const char HumKey[]; | ||
extern const char UpTimeKey[]; | ||
extern const char SignalStrengthKey[]; | ||
|
||
#endif |
This file contains 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
This file contains 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
Oops, something went wrong.