Added room collection devices to a class
This commit is contained in:
parent
f0b994ef9c
commit
5a5679b0ba
11
rooms.py
11
rooms.py
@ -3,6 +3,7 @@ from .topic import get_topic
|
|||||||
import logging
|
import logging
|
||||||
#
|
#
|
||||||
from devdi import topic as props
|
from devdi import topic as props
|
||||||
|
from devdi.topic import ALL_OFF_VIDEV_TOPIC, ALL_SUMMER_WINTER_MODE_TOPIC
|
||||||
from mqtt import mqtt_client
|
from mqtt import mqtt_client
|
||||||
"""
|
"""
|
||||||
In this module we initialse the smartzhome devices for all rooms.
|
In this module we initialse the smartzhome devices for all rooms.
|
||||||
@ -110,6 +111,7 @@ from devices import videv_hea
|
|||||||
from devices import videv_pure_switch
|
from devices import videv_pure_switch
|
||||||
from devices import videv_multistate
|
from devices import videv_multistate
|
||||||
from devices import videv_audio_player
|
from devices import videv_audio_player
|
||||||
|
from devices import videv_all_off
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
try:
|
try:
|
||||||
@ -130,6 +132,15 @@ class base_room(object):
|
|||||||
return this_device
|
return this_device
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# ROOM COLLECTION #################################################################################
|
||||||
|
#
|
||||||
|
class collection(object):
|
||||||
|
def __init__(self, mqtt_client: mqtt_client):
|
||||||
|
self.videv_all_off = videv_all_off(mqtt_client, ALL_OFF_VIDEV_TOPIC)
|
||||||
|
self.videv_summer_mode = videv_pure_switch(self.mqtt_client, ALL_SUMMER_WINTER_MODE_TOPIC)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# FFE #############################################################################################
|
# FFE #############################################################################################
|
||||||
#
|
#
|
||||||
|
2
topic.py
2
topic.py
@ -1,6 +1,8 @@
|
|||||||
from collections import UserString
|
from collections import UserString
|
||||||
|
|
||||||
STOP_EXECUTION_TOPIC = "TESTRUN_WHILE_DEBUG_ON/STOP_EXECUTION"
|
STOP_EXECUTION_TOPIC = "TESTRUN_WHILE_DEBUG_ON/STOP_EXECUTION"
|
||||||
|
ALL_OFF_VIDEV_TOPIC = "videv/off"
|
||||||
|
ALL_SUMMER_WINTER_MODE_TOPIC = "videv/summer_mode"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Device TYpe definitions
|
# Device TYpe definitions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user