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

slack_name #206

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion opengrid/library/houseprint/houseprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def _parse_sites(self, sheet):
construction_year=r['construction year'],
k_level=r['K-level'],
e_level=r['E-level'],
epc_cert=r['EPC certificate'])
epc_cert=r['EPC certificate'],
slack_name=r['Slack name']
)
self.sites.append(new_site)

print('{} Sites created'.format(len(self.sites)))
Expand Down
5 changes: 4 additions & 1 deletion opengrid/library/houseprint/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class Site(object):
def __init__(self, hp=None, key=None, size=None, inhabitants=None,
postcode=None, construction_year=None, k_level=None,
e_level=None, epc_cert=None, tmpos=None):
e_level=None, epc_cert=None, tmpos=None, slack_name=None):
self.hp = hp # backref to parent
self.key = key
self.size = size
Expand All @@ -23,6 +23,9 @@ def __init__(self, hp=None, key=None, size=None, inhabitants=None,
self.k_level = k_level
self.e_level = e_level
self.epc_cert = epc_cert
if slack_name == '':
slack_name = None
self.slack_name = slack_name

self.devices = []

Expand Down