Add ChType_Enum and enable SetChannelEnum. (#1830)

* create a ChType_Enum to go with SetChannelEnum

* resolve build errors for ChType_Enum PR

* fixing build errors for simulator and others for cmd_enums.c

* added ChType_ReadOnlyEnum and assocaited enum selftests

* ChType_Enum simulation and memory error corrections

* ChType_Enum documentation updates

---------

Co-authored-by: root <root@stonacek.nz>
This commit is contained in:
KC Stonacek
2025-10-14 20:21:18 +13:00
committed by GitHub
parent 993a46a19d
commit 4ad9a85a08
27 changed files with 564 additions and 112 deletions

View File

@ -101,6 +101,8 @@ typedef enum {
HASS_PERCENT,
HASS_TEXTFIELD,
HASS_BUTTON,
// @Brief ChType_ReadOnlyEnum, readonly with value_template
HASS_READONLYENUM,
} ENTITY_TYPE;
typedef enum {
@ -145,6 +147,8 @@ HassDeviceInfo* hass_createSelectEntity(const char* state_topic, const char* com
const char* options[], const char* title);
HassDeviceInfo* hass_createSelectEntityIndexed(const char* state_topic, const char* command_topic, int numoptions,
const char* options[], const char* title);
HassDeviceInfo* hass_createSelectEntityIndexedCustom(const char* state_topic, const char* command_topic, int numoptions,
const char* options[], const char* title, char* value_template, char* command_template);
HassDeviceInfo* hass_createToggle(const char *label, const char *stateTopic, const char *commandTopic);
HassDeviceInfo* hass_init_textField_info(int index);