Unofficial API for controlling home automation that runs on Nexwell Nexo system
from pyNexo import NexoWrapper, ImportTypes
nexo = NexoWrapper('1.2.3.4', 'password') # Initialize the connection
state = nexo.get_state('kitchen-lights') # Get current state of entity 'kitchen-lights'
nexo.set_state('kitchen-lights', 1) # Set state of entity 'kitchen-lights' to 'on'
resource = nexo.import_resource(ImportTypes.LIGHT) # Imports every entity of type 'light' on the Nexo system
resources = nexo.import_resources() # Imports every entity from the Nexo system
nexo.disconnect() # Close the connection