paller / wavin-controller

A controller for Wavin AHC 9000 written in Python with focus for use in home-automation.
11 stars 4 forks source link

Add name to room #9

Open paller opened 6 years ago

paller commented 6 years ago

Add an option for giving a name to a room, e.g. "Kitchen".

lauer commented 5 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.

paller commented 5 years ago

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.