Project Home‎ > ‎Documentation‎ > ‎Devices‎ > ‎

Room

A Room is a device that can gather other devices used to indicate a state of occupancy.  Normal use is to turn lights off when the room has been empty for a period of time.

States supported - UNKNOWN, OCCUPY, VACATE


Examples:

Here three motion sensors are used to trigger the state of the room.  In addition there is a trigger statement that will extend the occupancy time after the room becomes vacated.

# ______ ROOMS ___________________________________________________
r_upstairs = Room(name='Upstairs',
        devices=(m_livingroom, m_kitchen, m_hallway),
        trigger={ Attribute.COMMAND: Command.OCCUPY,
              Attribute.MAPPED: Command.VACATE,
              Attribute.SECS: 60*60,
            },
        )



r_downstairs = Room(name='Downstairs',
        devices=m_recroom,m_stairs
        trigger={ Attribute.COMMAND: Command.OCCUPY,
                Attribute.MAPPED: Command.VACATE,
                Attribute.SECS: 30*60,
            },
        )

Comments