Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Headers, and sort import #1786

Merged
merged 4 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions Classes/AdminWidgets.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/usr/bin/env python3
# coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# Author: zaraki673 & pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: badz & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

"""
Class: AdminWidget.py

Expand Down Expand Up @@ -31,12 +38,12 @@ def _get_switch_selector_options(self, ):
"SelectorStyle": "0",
}

return {
"LevelActions": "|||||||",
"LevelNames": "Off|Purge Reports|Soft Reset|One Time Enrolmennt|Perm. Enrollment|Interf Scan|LQI Report",
"LevelOffHidden": "true",
"SelectorStyle": "0",
}
return {
"LevelActions": "|||||||",
"LevelNames": "Off|Purge Reports|Soft Reset|One Time Enrolmennt|Perm. Enrollment|Interf Scan|LQI Report",
"LevelOffHidden": "true",
"SelectorStyle": "0",
}

class AdminWidgets:
def __init__(self, log, PluginConf, pluginParameters, ListOfDomoticzWidget, Devices, ListOfDevices, HardwareID, IEEE2NWK):
Expand Down Expand Up @@ -146,5 +153,3 @@ def updateNotificationWidget(self, Devices, notification):

def handleCommand(self, Command):
return


15 changes: 11 additions & 4 deletions Classes/DomoticzDB.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/usr/bin/env python3
# coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# Author: zaraki673 & pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: badz & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

"""
Module: z_DomoticzDico.py

Expand All @@ -15,12 +22,12 @@
import binascii
import json
import socket
import ssl
import time
import urllib.request
import ssl

from Modules.restartPlugin import restartPluginViaDomoticzJsonApi
from Classes.LoggingManagement import LoggingManagement
from Modules.restartPlugin import restartPluginViaDomoticzJsonApi
from Modules.tools import is_domoticz_new_API

CACHE_TIMEOUT = (15 * 60) + 15 # num seconds
Expand Down
12 changes: 9 additions & 3 deletions Classes/GroupMgtv2/GroupManagement.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# !/usr/bin/env python3
# coding: utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

# This is the Version 2 of Zigate Plugin Group Management.
#
Expand Down
29 changes: 15 additions & 14 deletions Classes/GroupMgtv2/GrpCallBackResponses.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# !/usr/bin/env python3
# coding: utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

from Classes.GroupMgtv2.GrpDatabase import (add_device_to_group, create_group,
remove_device_from_group,
write_groups_list)
from Classes.GroupMgtv2.GrpDomoticz import (
create_domoticz_group_device,
remove_domoticz_group_device,
update_domoticz_group_device,
update_domoticz_group_device_widget,
)
from Classes.GroupMgtv2.GrpDatabase import (
write_groups_list,
create_group,
add_device_to_group,
remove_device_from_group,
)
create_domoticz_group_device, remove_domoticz_group_device,
update_domoticz_group_device, update_domoticz_group_device_widget)


def checkToCreateOrUpdateGroup(self, NwkId, Ep, GroupId):
Expand Down
3 changes: 0 additions & 3 deletions Classes/GroupMgtv2/GrpCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
# SPDX-License-Identifier: GPL-3.0 license





from Modules.tools import Hex_Format, rgb_to_hsl, rgb_to_xy
from Modules.zigateConsts import ADDRESS_MODE, ZIGATE_EP
from Zigbee.zclCommands import (zcl_add_group_membership,
Expand Down
12 changes: 9 additions & 3 deletions Classes/GroupMgtv2/GrpDatabase.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# !/usr/bin/env python3
# coding: utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

"""
Methodes which manipulate the Groups Data Structure
Expand Down
4 changes: 2 additions & 2 deletions Classes/GroupMgtv2/GrpDomoticz.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from Modules.domoticzAbstractLayer import (
FreeUnit, domo_create_api, domo_delete_widget, domo_read_Name,
domo_read_nValue_sValue, domo_read_SwitchType_SubType_Type,
domo_update_api, domo_update_name,
domo_update_SwitchType_SubType_Type, find_first_unit_widget_from_deviceID)
domo_update_api, domo_update_name, domo_update_SwitchType_SubType_Type,
find_first_unit_widget_from_deviceID)
from Modules.tools import Hex_Format, is_domoticz_latest_typename, is_hex
from Modules.zigateConsts import ADDRESS_MODE, LEGRAND_REMOTES, ZIGATE_EP
from Zigbee.zclCommands import (zcl_group_level_move_to_level,
Expand Down
11 changes: 11 additions & 0 deletions Classes/GroupMgtv2/GrpIkeaRemote.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

from Classes.GroupMgtv2.GrpCommands import set_kelvin_color, set_rgb_color
from Classes.GroupMgtv2.GrpDomoticz import update_domoticz_group_device_widget
Expand Down
13 changes: 9 additions & 4 deletions Classes/GroupMgtv2/GrpMigration.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# !/usr/bin/env python3
# coding: utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license


from Modules.domoticzAbstractLayer import (domoticz_error_api,
domoticz_log_api,
domoticz_status_api)



def migrateIfTradfriRemote(self, GrpId):

if "Tradfri Remote" not in self.ListOfGroups[GrpId]:
Expand Down
12 changes: 9 additions & 3 deletions Classes/GroupMgtv2/GrpResponses.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# !/usr/bin/env python3
# coding: utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

# All operations to and from Zigate

Expand Down
12 changes: 9 additions & 3 deletions Classes/GroupMgtv2/GrpServices.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# !/usr/bin/env python3
# coding: utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

from time import time

Expand Down
13 changes: 9 additions & 4 deletions Classes/GroupMgtv2/GrpWebServices.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# !/usr/bin/env python3
# coding: utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: pipiche38
# Implementation of Zigbee for Domoticz plugin.
#

# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

from time import time

Expand Down
11 changes: 9 additions & 2 deletions Classes/IAS.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/usr/bin/env python3
# coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# Author: zaraki673 & pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: badz & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

"""
Module: z_IAS.py
Description: IAS Zone management
Expand Down
12 changes: 9 additions & 3 deletions Classes/NetworkEnergy.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/usr/bin/env python3
# coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# Author: zaraki673 & pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: badz & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

# Module: NetworkEnergy.py
#
# Description: Network Energy/Interferences
Expand Down
17 changes: 12 additions & 5 deletions Classes/NetworkMap.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/usr/bin/env python3
# coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# Author: zaraki673 & pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: badz & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

#
# Module: NetworkMap.py
#
Expand All @@ -26,12 +33,12 @@

import json
import os.path
from pathlib import Path
import time
from datetime import datetime
from pathlib import Path

from Modules.zb_tables_management import (mgmt_rtg, start_new_table_scan,
update_merge_new_device_to_last_entry)
from Modules.zb_tables_management import (
mgmt_rtg, start_new_table_scan, update_merge_new_device_to_last_entry)
from Zigbee.zdpCommands import zdp_NWK_address_request, zdp_nwk_lqi_request


Expand Down
10 changes: 8 additions & 2 deletions Classes/PluginConf.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/usr/bin/env python3
# coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# Author: pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: badz & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

"""
Class PluginConf
Expand Down
10 changes: 8 additions & 2 deletions Classes/TransportStats.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/usr/bin/env python3
# coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# Author: zaraki673 & pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: badz & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license


import json
Expand Down
12 changes: 9 additions & 3 deletions Classes/WebServer/WebServer.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#!/usr/bin/env python3
# coding: utf-8 -*-
# -*- coding: utf-8 -*-
#
# Author: zaraki673 & pipiche38
# Implementation of Zigbee for Domoticz plugin.
#
# This file is part of Zigbee for Domoticz plugin. https://github.com/zigbeefordomoticz/Domoticz-Zigbee
# (C) 2015-2024
#
# Initial authors: zaraki673 & pipiche38
#
# SPDX-License-Identifier: GPL-3.0 license

import json
import mimetypes
Expand All @@ -25,7 +31,7 @@
domoticz_log_api,
domoticz_status_api)
from Modules.sendZigateCommand import sendZigateCmd
from Modules.tools import is_hex, get_device_nickname
from Modules.tools import get_device_nickname, is_hex
from Modules.txPower import set_TxPower
from Modules.zigateCommands import zigate_set_mode
from Modules.zigateConsts import (CERTIFICATION_CODE, ZCL_CLUSTERS_LIST,
Expand Down
Loading
Loading