# use the `empty_init` flag to create an empty object
hp = houseprint.Houseprint(empty_init=True)

hp

"""
Explanation: Create your own sharable houseprint objects
So you want to create your own Houseprint object which you can save to a file and share with your project partners? Follow this guide:
Create an empty Houseprint Object
End of explanation
"""


site1 = houseprint.Site(key="Your house name")

# consult the docs to see what fields are available!
# houseprint.Site??
# houseprint.Fluksometer??
# houseprint.Fluksosensor??

device1 = houseprint.Fluksometer(key='fluksoname')

sensor1 = houseprint.Fluksosensor(key='keykeykey', token="blabla", type='electricity')

"""
Explanation: Create sites, devices and sensors
There is a strong hierarchy, which you must follow!
End of explanation
"""


device1.add_sensor(sensor1)

site1.add_device(device1)

hp.add_site(site1)

hp

"""
Explanation: Add everything together
End of explanation
"""


hp.save('sharable_houseprint.pkl')

"""
Explanation: Save Houseprint to file
End of explanation
"""


hp2 = houseprint.load_houseprint_from_file('sharable_houseprint.pkl')

hp2

hp2.init_tmpo()

hp2.get_data()

"""
Explanation: Share this file with your friends!
How to load in and use the houseprint file you've received
End of explanation
"""


