Skip to content

Commit

Permalink
Sync device when click save
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Feb 6, 2024
1 parent 11cd16c commit 0ddf54c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ def devices():

db.session.add(dbsettings)
db.session.commit()

if dbuser.googleassistant is True:
if report_state.report_state_enabled():
report_state.call_homegraph_api('sync', {"agentUserId": current_user.username})
else:
getDomoticzDevices(current_user.username)

logger.info("Device settings saved")

Expand Down

0 comments on commit 0ddf54c

Please sign in to comment.