This file implements scenes in SmartHomeNG

class lib.scene.Scenes(smarthome)[source]

Bases: object

This class loads all scene definitions from /scenes folder and adds the necessary triggers for the scenes to function.

Note:The scene definitions are stored in /scenes files with the extension .conf but don’t follow the file format for conf-files of!
Parameters:smarthome (object) – Main SmartHomeNG object
static get_instance()[source]

Returns the instance of the Scenes class, to be used to access the scene-api

Use it the following way to access the api:

from lib.scene import Scenes
scenes = Scenes.get_instance()

# to access a method (eg. xxx()):
Returns:logics instance
Return type:object of None

Returns a list with the names of all scenes that are currently loaded

Returns:list of scene names
Return type:list
get_scene_action_name(scenename, action)[source]

Returns the name of a scene-action


Returns a list with the the defined actions for a scene

Returns:list of scene values
Return type:list
return_scene_value_actions(name, state)[source]

Returns a list with the the defined actions for state of a scene

Returns:list of value actions (destination item name, value to set)
Return type:list