[cli][supervise] check the real mac address
This commit is contained in:
parent
614e4f37df
commit
c927d82250
1 changed files with 6 additions and 2 deletions
|
|
@ -140,14 +140,18 @@ def fetch():
|
|||
def supervise(since):
|
||||
logger = logger_init()
|
||||
|
||||
from .config import config
|
||||
from .config import config, mac_address_init
|
||||
mac_address = config.get('heatpump','mac_address')
|
||||
if mac_address == 'None':
|
||||
mac_address = mac_address_init()
|
||||
|
||||
from .models.heatpump import Heatpump
|
||||
|
||||
last_update = None
|
||||
if since:
|
||||
last_update = int(datetime.now().strftime('%s')) - config.getint('supervisor', 'interval')
|
||||
|
||||
h = Heatpump(config.get('heatpump','mac_address'), last_update)
|
||||
h = Heatpump(mac_address, last_update)
|
||||
|
||||
base_url = {
|
||||
'scheme':config.get('supervisor', 'scheme'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue