Filter discovery messages against HASS classes list (#1127)
* Filter the discovery message content against HASS list of classes
This commit is contained in:
1 parent
e6003c877c
commit
71d5622a52
2 files changed
+28
-2
No files matched your search
@@ -196,4 +196,21 @@ void announceDeviceTrigger(bool use_gateway_info,
|
||||
# define stateClassTotalIncreasing "total_increasing"
|
||||
#endif
|
||||
|
||||
// From https://github.com/home-assistant/core/blob/d7ac4bd65379e11461c7ce0893d3533d8d8b8cbf/homeassistant/const.py#L225
|
||||
// List of classes available in Home Assistant
|
||||
const char* availableHASSClasses[] = {"battery",
|
||||
"carbon_monoxide",
|
||||
"carbon_dioxide",
|
||||
"humidity",
|
||||
"illuminance",
|
||||
"signal_strength",
|
||||
"temperature",
|
||||
"timestamp",
|
||||
"pressure",
|
||||
"power",
|
||||
"current",
|
||||
"energy",
|
||||
"power_factor",
|
||||
"voltage"};
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user