mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-07 23:05:47 +00:00
made avty disable global
This commit is contained in:
@ -324,13 +324,13 @@ HassDeviceInfo* hass_init_device_info(ENTITY_TYPE type, int index, const char* p
|
||||
cJSON_AddStringToObject(info->root, "~", CFG_GetMQTTClientId()); //base topic
|
||||
// remove availability information for sensor to keep last value visible on Home Assistant
|
||||
bool flagavty = false;
|
||||
flagavty = CFG_HasFlag(OBK_FLAG_NOT_PUBLISH_AVAILABILITY_SENSOR);
|
||||
flagavty = CFG_HasFlag(OBK_FLAG_NOT_PUBLISH_AVAILABILITY);
|
||||
// if door sensor is running, then deep sleep will be invoked mostly, then we dont want availability
|
||||
#ifndef OBK_DISABLE_ALL_DRIVERS
|
||||
if (DRV_IsRunning("DoorSensor") == false && DRV_IsRunning("tmSensor") == false)
|
||||
#endif
|
||||
{
|
||||
if (!isSensor || !flagavty) {
|
||||
if (!isSensor && !flagavty) {
|
||||
cJSON_AddStringToObject(info->root, "avty_t", "~/connected"); //availability_topic, `online` value is broadcasted
|
||||
}
|
||||
}
|
||||
|
||||
@ -2641,7 +2641,7 @@ const char* g_obk_flagNames[] = {
|
||||
"[LED] Use old linear brightness mode, ignore gamma ramp",
|
||||
"[MQTT] Apply channel type multiplier on (if any) on channel value before publishing it",
|
||||
"[MQTT] In HA discovery, add relays as lights",
|
||||
"[HASS] Deactivate avty_t flag for sensor when publishing to HASS (permit to keep value). You must restart HASS discovery for change to take effect.",
|
||||
"[HASS] Deactivate avty_t flag when publishing to HASS (permit to keep value). You must restart HASS discovery for change to take effect.",
|
||||
"[DRV] Deactivate Autostart of all drivers",
|
||||
"[WiFi] Quick connect to WiFi on reboot (TODO: check if it works for you and report on github)",
|
||||
"[Power] Set power and current to zero if all relays are open",
|
||||
|
||||
Reference in New Issue
Block a user