Minor changes
This commit is contained in:
parent
e6a2bae255
commit
fd486f83e5
@ -1228,7 +1228,7 @@ void zh_device_availability_check_task(void *pvParameter)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (esp_timer_get_time() / 1000000 > available_device->time + (available_device->frequency * 1.25)) // + 25% just in case.
|
||||
if (esp_timer_get_time() / 1000000 > available_device->time + (available_device->frequency * 1.50)) // + 50% just in case.
|
||||
{
|
||||
char *topic = (char *)heap_caps_malloc(strlen(gateway_config->software_config.mqtt_topic_prefix) + strlen(zh_get_device_type_value_name(available_device->device_type)) + 27, MALLOC_CAP_8BIT);
|
||||
memset(topic, 0, strlen(gateway_config->software_config.mqtt_topic_prefix) + strlen(zh_get_device_type_value_name(available_device->device_type)) + 27);
|
||||
@ -1311,7 +1311,7 @@ void zh_gateway_send_mqtt_json_config_message(const gateway_config_t *gateway_co
|
||||
data.payload_data.config_message.binary_sensor_config_message.binary_sensor_device_class = HABSDC_CONNECTIVITY;
|
||||
data.payload_data.config_message.binary_sensor_config_message.payload_on = HAONOFT_CONNECT;
|
||||
data.payload_data.config_message.binary_sensor_config_message.payload_off = HAONOFT_NONE;
|
||||
data.payload_data.config_message.binary_sensor_config_message.expire_after = ZH_GATEWAY_KEEP_ALIVE_TIME * 1.25; // + 25% just in case.
|
||||
data.payload_data.config_message.binary_sensor_config_message.expire_after = ZH_GATEWAY_KEEP_ALIVE_TIME * 1.50; // + 50% just in case.
|
||||
data.payload_data.config_message.binary_sensor_config_message.enabled_by_default = true;
|
||||
data.payload_data.config_message.binary_sensor_config_message.force_update = true;
|
||||
data.payload_data.config_message.binary_sensor_config_message.qos = 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user