
from time import sleep
from utils.mqtt import publish
from weather import Weather

w = Weather()

while True:
    publish(w.basics(),"stormfly")
    sleep(600)


from time import sleep
from utils.mqtt import publish
from weather import Weather

w = Weather()

while True:
    publish(w.basics(),"stormfly")
    sleep(600)
    w.refresh()

FIX refresh data when running in loop
FIX refresh data when running in loop

  
  from time import sleep
  from utils.mqtt import publish
  from weather import Weather
  
  w = Weather()
  
  while True:
      publish(w.basics(),"stormfly")
      sleep(600)
+     w.refresh()
  
FIX refresh data when running in loop
## Code Before:

from time import sleep
from utils.mqtt import publish
from weather import Weather

w = Weather()

while True:
    publish(w.basics(),"stormfly")
    sleep(600)

## Instruction:
FIX refresh data when running in loop
## Code After:

from time import sleep
from utils.mqtt import publish
from weather import Weather

w = Weather()

while True:
    publish(w.basics(),"stormfly")
    sleep(600)
    w.refresh()
