From 6a877e19f5500dccb01f054716606bf76164ced2 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 4 Oct 2015 11:19:47 -0700 Subject: [PATCH] Update scene docs --- source/components/scene.markdown | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/source/components/scene.markdown b/source/components/scene.markdown index 9b9a123fc6e..90a9d31ab1d 100644 --- a/source/components/scene.markdown +++ b/source/components/scene.markdown @@ -9,28 +9,36 @@ sharing: true footer: true --- -A user can create scenes that capture the states you want certain entities to be. For example a scene can contain that light A should be turned on and light B should be bright red. Deactivating a scene will restore the previous state from before the scene was activated. Just like scripts, scenes have their own separate page to see which scenes are on. -Scenes can be activated using the service scene.turn_on and deactivated using the service scene.turn_off. +A user can create scenes that capture the states you want certain entities to be. For example a scene +can contain that light A should be turned on and light B should be bright red. + +A scene is active if all states of the scene match the actual states. An optional `fuzzy_match` option +can be given to allow entities to match if attributes are not exact but are in range of the preferred +state. + +If a scene is manually activated it will store the previous state of the entities. These will be +restored when the state is deactivated manually. If one of the enties that are being tracked change +state on its own, the old state will not be restored when it is being deactivated. + +Scenes can be activated using the service `scene.turn_on` and deactivated using the service `scene.turn_off`. ```yaml # Example configuration.yaml entry scene: - name: Romantic + # Optional, allow fuzzy matching number atttributes to check if scene is on + fuzzy_match: 0.2 entities: light.tv_back_light: on light.ceiling: state: on color: [0.33, 0.66] brightness: 200 - - - name: all_lights_on - entities: - group.all_lights: + + - name: Movies + entities: + light.tv_back_light: state: on - - - name: all_lights_off - entities: - group.all_lights: - state: off - + brightness: 100 + light.ceiling: off ```