Added room collection devices to a class

This commit is contained in:
Dirk Alders 2025-08-31 11:35:23 +02:00
parent f0b994ef9c
commit 5a5679b0ba
2 changed files with 13 additions and 0 deletions

View File

@ -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 #############################################################################################
# #

View File

@ -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