fix mqtt by waiting on publish
This commit is contained in:
parent
6daba47faf
commit
a1604ad527
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
package mqtt
|
package mqtt
|
||||||
|
|
||||||
func (s *Service) HandleSchalterStateChange(open bool) {
|
func (s *Service) HandleSchalterStateChange(open bool) {
|
||||||
s.client.Publish("ccchb/schalter", 0, true, open)
|
token := s.client.Publish("p5/schalter/state/open", 0, true, open)
|
||||||
|
token.Wait()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue