This commit is contained in:
@@ -13,30 +13,6 @@ __module_name__ = "resources"
|
||||
__version__text__ = "1"
|
||||
|
||||
|
||||
class AllDevicesOfflineResource(Resource):
|
||||
"""
|
||||
Shut down all devices
|
||||
"""
|
||||
def post(self):
|
||||
"""
|
||||
Shut down every device
|
||||
:return:
|
||||
"""
|
||||
mqtt.publish(f"{config.MQTT_COMMAND_TOPIC}/+", {"command": "offline"})
|
||||
|
||||
|
||||
class AllDevicesOnlineResource(Resource):
|
||||
"""
|
||||
Bring every device online
|
||||
"""
|
||||
def post(self):
|
||||
"""
|
||||
Bring every device online
|
||||
:return:
|
||||
"""
|
||||
mqtt.publish(f"{config.MQTT_COMMAND_TOPIC}/+", {"command": "online"})
|
||||
|
||||
|
||||
class DeviceOfflineResrouce(Resource):
|
||||
"""
|
||||
Bring a device offline
|
||||
|
||||
Reference in New Issue
Block a user