[DISC] make mi scale weighing_mode and unit enum (#1766)
* make mi scale weighing_mode and unit enum * lint
This commit is contained in:
1 parent
c4a84651d4
commit
00b2ec93cb
3 files changed
+26
-3
No files matched your search
@@ -88,7 +88,7 @@ extern void createDiscovery(const char* sensor_type,
|
||||
int off_delay,
|
||||
const char* payload_available, const char* payload_not_available, bool gateway_entity, const char* command_topic,
|
||||
const char* device_name, const char* device_manufacturer, const char* device_model, const char* device_mac, bool retainCmd,
|
||||
const char* state_class, const char* state_off = nullptr, const char* state_on = nullptr);
|
||||
const char* state_class, const char* state_off = nullptr, const char* state_on = nullptr, const char* enum_options = nullptr);
|
||||
|
||||
/**
|
||||
* @brief Create a message for Discovery Device Trigger. For HA @see https://www.home-assistant.io/integrations/device_trigger.mqtt/
|
||||
@@ -196,7 +196,8 @@ const char* availableHASSClasses[] = {"battery",
|
||||
"current",
|
||||
"energy",
|
||||
"power_factor",
|
||||
"voltage"};
|
||||
"voltage",
|
||||
"enum"};
|
||||
|
||||
// From https://github.com/home-assistant/core/blob/d7ac4bd65379e11461c7ce0893d3533d8d8b8cbf/homeassistant/const.py#L379
|
||||
// List of units available in Home Assistant
|
||||
|
||||
Reference in new issue
Block a user