fix mqtt by waiting on publish

This commit is contained in:
Martin/Geno 2019-08-07 12:57:20 +02:00
parent 6daba47faf
commit a1604ad527
No known key found for this signature in database
GPG key ID: 9D7D3C6BFF600C6A

View file

@ -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()
} }