support timeout
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user