support timeout

This commit is contained in:
Drath
2025-09-12 23:36:07 +02:00
parent b3e339027f
commit cc038ec0a2
2 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
#define HASS_ENTITY "sensor.gniazdko_komputer_moc"
int hass_connect();
void hass_poll();
void hass_service(int timeout_ms = 0);
float hass_get();
void hass_disconnect();

View File

@@ -139,9 +139,9 @@ int hass_connect() {
return 0;
}
void hass_poll() {
lws_service(context, 0);
void hass_service(int timeout_ms) {
lws_callback_on_writable(websock);
lws_service(context, timeout_ms);
}
float hass_get() {