Skip to content

Commit a89213c

Browse files
committed
fix: values not updated after home assistant is restarted
1 parent b9373af commit a89213c

4 files changed

Lines changed: 15 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Intouch2-MQTT"
22
description: "A bridge between intouch2, used in spa systems, and MQTT 3.3"
3-
version: "0.1.262"
3+
version: "0.1.263"
44
slug: "intouch2-mqtt"
55
init: false
66
arch:

intouch2-mqtt/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "intouch2-mqtt"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

intouch2-mqtt/src/mapping.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,18 @@ impl Mapping {
594594
let lock: Option<OwnedMutexGuard<()>> =
595595
mem::take(&mut first_state_sent);
596596
drop(lock);
597-
data_subscription.changed().await?;
597+
loop {
598+
select! {
599+
_ = data_subscription.changed() => {
600+
break
601+
}
602+
_ = initialized.changed() => {
603+
if *initialized.borrow_and_update() {
604+
break
605+
}
606+
}
607+
}
608+
}
598609
}
599610
});
600611
}

0 commit comments

Comments
 (0)