Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
flatsiedatsie authored Jul 11, 2022
1 parent c821238 commit 4f0a77f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions pkg/presence_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ def handle_unfound_accepted_things(self):

if _id in self.previously_found.keys():
if self.DEBUG:
print("hurray, device was found again")
print("hurray, device was found again, not a zombie")
else:
if self.DEBUG:
print("Error, zombie detected. This device was not found in the initial scan, should create it and set it to missing")
Expand All @@ -1766,7 +1766,7 @@ def handle_unfound_accepted_things(self):
name = str(self.saved_devices_from_controller[_id]['title'])
if self.DEBUG:
print("name in saved_devices_from_controller: " + str(name))
device = PresenceDevice(self, _id, name, "unknown")
device = PresenceDevice(self, _id, name, None)
self.handle_device_added(device)

# Set thing to connected state
Expand Down
39 changes: 20 additions & 19 deletions pkg/presence_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,28 +39,29 @@ def __init__(self, adapter, _id, name, details):

self.last_add_mute_time = 0
self.mute_until = 0

self.properties['details'] = PresenceProperty(
self,
'details',
{
'title': 'IP address',
'type': 'string',
'readOnly': True,
},
str(details))

if details != None:
self.properties['details'] = PresenceProperty(
self,
'details',
{
'title': 'IP address',
'type': 'string',
'readOnly': True,
},
str(details))

if self.adapter.DEBUG:
print("+ Adding new device: " + str(name))
if self.adapter.DEBUG:
print("+ Adding new device: " + str(name))

action_meta = { "toggle":
{
"@type": "ToggleAction",
"title": "Toggle",
"description": "Toggggle"
action_meta = { "toggle":
{
"@type": "ToggleAction",
"title": "Toggle",
"description": "Toggggle"
}
}
}
self.add_action("Data mute", action_meta)
self.add_action("Data mute", action_meta)



Expand Down

0 comments on commit 4f0a77f

Please sign in to comment.