Open paller opened 6 years ago
Can it be saved on the controller or just an config file together with the script?
Just a note, remember that one room/sensor can have multiple channels/actuator attached. So e.g. on large rooms we only have one sensor, but to attached strings with hot water.
As a room can contain multiple channels and multiple sensors the logical grouping would be to define a room and then associate channels and sensors with it.
I'm thinking something like:
class Room:
def __init__(self, name):
self.name = name
self.channels = list()
self.sensors = list()
def add_channel(self, channel):
pass
def add_sensor(self, sensor):
pass
with the option for adding channels and sensors in the constructor.
This might require some other minor structural changes but it should easily be done. I will see if I can make a draft soon.
With regards to a config file it's not a bad idea. Will be a different task though.
Add an option for giving a name to a room, e.g. "Kitchen".