blueprint: name: Hue-like Scenes domain: script description: |- This script replicates Hue scenes. Each scene has five different colors represented by XY values. These colors are distributed randomly on the participating lights (must support XY or RGB color modes) -- each light gets a different color. The script can run in two modes, selectable *at runtime*, corresponding to setting lights once or repeatedly. If `repeat_delay` is specified at the start of the script, it runs continuously, with the specified delay in between rounds. In this case, the end of the script is determined by the `stop_when_lights_turn_off` parameter: If set to true, the script turns off when one of the participating lights is turned off. If set to false, the script runs until it is turned off. If `repeat_delay` is left empty or set to 0:00:00, lights are set once and the script ends. The script has various configuration options, described below. ## Usage The intended setup is to instantiate the blueprint for each area in which it will be run. To facilitate daily use, you can define buttons as pre-defined action call. To launch the scene "Savanna sunset" as a dynamic scene, you can define a mushroom card like this: ``` type: custom:mushroom-template-card primary: Savanna sunset picture: /local/hue/Savanna sunset.jpg tap_action: action: call-service service: script.hue_like_scenes target: {} data: scene: Savanna sunset ``` If called as part of another script, make sure to use the action `script.turn_on`, so that it runs in the background ([see here](https://www.home-assistant.io/integrations/script/#waiting-for-script-to-complete)): ``` action: script.turn_on data: variables: scene: Savanna sunset metadata: {} target: entity_id: script.hue_like_scenes ``` ## Changelog ### 3.6 - Script now also accepts lights with color mode "hs" (fixes #18) - New scene categories "Harvest" and "Wanderlust" (thanks, @MVrauwdeunt) ### 3.5 - Fixed typos in the examples - Added a new field called "Initial Action", used to specify actions that run before the main loop. Can be empty. - (Some) support for RGBW color mode: For lights that *only* support RGB or RGBW color modes, the color is automatically converted into RGB/RGBW. In case of RGBW, the white value is set to 0. This probably doesn't work perfectly. If you encounter issues, please try with turning the lights off first, using the new initial action feature. - Simplified some of the template magic by using new functions, therefore minimum Home Assistant version is now 2025.4. ### 3.4 - You can now specify a label, which will then be added to all participating lights. **This requires [Spook](https://spook.boo) to be installed**, which can be done via HACS. Assigning a label makes it easier to control the brightness of the participating lights. It is best to use one label per script, and not to use these labels for anything else, because the script first removes the label from all entities. - For specifying your own scene, it is no longer necessary to also specify a brightness (i.e., you can omit the "b" key in the object). - Specifying your own scene is no longer a required argument ### 3.3 - When launching the script, it is now possible to specify your own colors. If the script is called with specified colors, the scene changes to "Special: My scene". There is no limit on the number of colors. It is probably the best use to define a button to call the script with specific colors. The YAML code for such a call looks like this: ``` tap_action: action: perform-action perform_action: ENTITY_ID_OF_THE_SCRIPT target: {} data: scene: "Special: My scene" repeat_delay: hours: 0 minutes: 0 seconds: 30 onlyonlights: false use_scene_brightness: false brightness: 100 my_scene: c: - - 0.2361 - 0.2152 - - 0.2557 - 0.2325 b: 0.6 ``` Note: This may not be the final form of the feature. If possible, it would be cool to specify your own scenes as part of the blueprint instantiation. ### 3.2 - Newer scene categories added (Daily, Halloween, Race day, Romantic, Winter holidays). Thanks @Glennmen! - Updated format for storing scene information. ### 3.1.1 - Fixed a bug that sometimes set small brightness values to zero because of rounding. Thanks @Glennmen! ### 3.1 - The list of scenes that are offered can now also be restricted as part of the blueprint setup. I.e., if you know that some scenes will never be needed, you can deselect them, and they will not be shown in the dropdown. They can still be selected as part of an action call. - Default scenes (Bright, Concentrate, Cool bright, Dimmed, Energize, Nightlight, Read, Relax, Rest) will now also be applied to bulbs that don't support colors, but only color temperature. In addition, there is a toggle setting in the blueprint to always include non-color bulbs for all scenes. ### 3.0 - Added default Hue scenes (Bright, Concentrate, Cool bright, Dimmed, Energize, Nightlight, Read, Relax, Rest). - Scene selection dropdown now shows scene set (Cozy, Defaults, Dreamy, Futuristic, Lush, Luxurious, Party vibes, Peaceful, Pure, Refreshing, Serenity, Sunrise). When launching the script (e.g. as an action), users can use the simple name as before, or a combination of set and scene name (e.g., `Cozy: Savanna sunset`). - The script now includes pre-defined brightness settings. When starting, one now has three options: a) Define a brightness value, b) use the scene-defined value, and c) leave the brightness as it is. - As part of the blueprint input settings, it is now possible to also set default values for the script. All script fields can be specified, and the script can then be run without any arguments (e.g., if you're mostly using one scene, you can set it as default). - Fixed a bug for non-dynamic scenes ### 2.5.1 - Fixed a bug in assigning first colors for colorloop. ### 2.5 - Added input `stop_when_lights_turn_off` to allow running the script continuously. - Added scene "Colorloop", which iterates over the entire color wheel. Colorloop uses hs color scheme, and only changes the hue value without touch the saturation. - Re-added a scene consisting of random colors. Note that random colors are selected once when the script starts and then distributed over the lights. - Added input `debug` to generate debug messages in the log. ### 2.4 - It is now possible to also specify devices. If a device has multiple entities from the light domain, all will be added individually. ### 2.3 - Selecting the lights is now done via proper lists, and no longer relies on parsing json - New scene: Malibu pink - Description of the scene field is shorter - Added a report entity field. This can be a `input_text` entity and whenever a scene is set, the scene name is written into the entity. ### 2.2 - Transition time is now a blueprint field. - Repeat delay now has a default value of two minutes. - Fixed bug in duration format. ### 2.1 - The blueprint now contains all the Hue color scenes that are listed [here](https://gist.github.com/Hypfer/a0a8b5b9429831a7306ec4300077eaaa). ### 2.0 - Made into a blueprint. Intended use case: Instantiate blueprint for each area (then they can run independently in parallel). - Supports loop mode, a.k.a. dynamic scenes - Can exclude lights by manufacturer - Select lights by labels ## Scene images The images used in the Hue app to represent a scene use creative commons licenses. The following is a list of (some) scenes and image sources: - Savanna Sunset: https://www.flickr.com/photos/ladydragonflyherworld/6293722846 - Majestic Morning: https://unsplash.com/photos/aerial-photo-of-foggy-trees-and-mountains-dbu1zrkZZuo - Horizon: https://www.pexels.com/photo/rocks-on-water-2261500/ - Tropical Twilight: https://www.flickr.com/photos/130079987@N02/16342014082 - Crocus: https://unsplash.com/photos/close-up-photo-of-purple-petaled-flower-hB_xgEXucQs author: Nils Reiter homeassistant: min_version: "2025.04.00" input: target: name: Target description: >- Select one or more areas, devices, labels or light entities. The script picks compatible lights on its own. selector: target: entity: domain: light label: name: Label description: >- If selected, the script assigns the label to all participating lights when it starts. default: null selector: label: scene_pre_selection: name: Scenes description: >- Select scenes to be offered in the UI default: - "Cozy: Dreamy dusk" - "Cozy: Golden pond" - "Cozy: Honolulu" - "Cozy: Rolling hills" - "Cozy: Ruby glow" - "Cozy: Savanna sunset" - "Cozy: Tropical twilight" - "Cozy: Warm embrace" - "Daily: Arise" - "Daily: Nighttime" - "Daily: Shine" - "Daily: Sleepy" - "Daily: Storybook" - "Daily: Unwind" - "Defaults: Bright" - "Defaults: Concentrate" - "Defaults: Cool bright" - "Defaults: Dimmed" - "Defaults: Energize" - "Defaults: Nightlight" - "Defaults: Read" - "Defaults: Relax" - "Defaults: Rest" - "Dreamy: Adrift" - "Dreamy: Blue lagoon" - "Dreamy: Lake Placid" - "Dreamy: Majestic morning" - "Dreamy: Palm Beach" - "Dreamy: Pensive" - "Dreamy: Still waters" - "Dreamy: Sundown" - "Futuristic: Disturbia" - "Futuristic: Hal" - "Futuristic: Magneto" - "Futuristic: Soho" - "Futuristic: Tyrell" - "Futuristic: Vapor wave" - "Halloween: Glowing grins" - "Halloween: Hocus pocus" - "Halloween: Pandemonium" - "Halloween: Phantom" - "Halloween: Spellbound" - "Halloween: Toil and trouble" - "Halloween: Trick or treat" - "Halloween: Witching hour" - "Harvest hues: Amber robin" - "Harvest hues: Autumn gold" - "Harvest hues: Downtown drizzle" - "Harvest hues: November haze" - "Harvest hues: Pumpkin patch" - "Harvest hues: Pumpkin spice" - "Harvest hues: Woodland toadstool" - "Harvest hues: Fall harvest" - "Lush: Amber bloom" - "Lush: Blue planet" - "Lush: Forest adventure" - "Lush: Lily" - "Lush: Meriete" - "Lush: Orange fields" - "Lush: Painted sky" - "Lush: Winter beauty" - "Luxurious: Emerald flutter" - "Luxurious: Memento" - "Luxurious: Resplendent" - "Luxurious: Scarlet dream" - "Party vibes: Cancun" - "Party vibes: Chinatown" - "Party vibes: Fairfax" - "Party vibes: Ibiza" - "Party vibes: Miami" - "Party vibes: Motown" - "Party vibes: Osaka" - "Party vibes: Rio" - "Party vibes: Tokyo" - "Peaceful: Emerald isle" - "Peaceful: Frosty dawn" - "Peaceful: Lake mist" - "Peaceful: Mountain breeze" - "Peaceful: Ocean dawn" - "Peaceful: Spring blossom" - "Peaceful: Sunday morning" - "Pure: Amethyst valley" - "Pure: Autumn gold" - "Pure: Hazy days" - "Pure: Midsummer sun" - "Pure: Midwinter" - "Pure: Misty ridge" - "Pure: Spring lake" - "Pure: Winter mountain" - "Race Day: Bahrain" - "Race Day: Miami" - "Race Day: Silverstone" - "Race Day: Singapore" - "Race Day: Suzuka" - "Race Day: São Paulo" - "Race Day: Zandvoort" - "Refreshing: Blossom" - "Refreshing: Crocus" - "Refreshing: Narcissa" - "Refreshing: Precious" - "Romantic: City of love" - "Romantic: Glitz and glam" - "Romantic: Lovebirds" - "Romantic: Promise" - "Romantic: Ruby romance" - "Romantic: Smitten" - "Romantic: Sunset allure" - "Serenity: Arctic aurora" - "Serenity: Blood moon" - "Serenity: Galaxy" - "Serenity: Moonlight" - "Serenity: Nebula" - "Serenity: Starlight" - "Sunrise: Beginnings" - "Sunrise: First light" - "Sunrise: Horizon" - "Sunrise: Sunflare" - "Sunrise: Valley dawn" - "Wanderlust: Coastal nights" - "Wanderlust: Island warmth" - "Wanderlust: Ocean escape" - "Wanderlust: Rome" - "Wanderlust: Santorini" - "Winter holidays: Color burst" - "Winter holidays: Crystalline" - "Winter holidays: Festive fun" - "Winter holidays: Golden star" - "Winter holidays: Jolly" - "Winter holidays: Nutcracker" - "Winter holidays: Rosy sparkle" - "Winter holidays: Silent night" - "Winter holidays: Snow sparkle" - "Winter holidays: Under the tree" - "Special: Colorloop" - "Special: Random" - "Special: My scene" selector: select: options: - "Cozy: Dreamy dusk" - "Cozy: Golden pond" - "Cozy: Honolulu" - "Cozy: Rolling hills" - "Cozy: Ruby glow" - "Cozy: Savanna sunset" - "Cozy: Tropical twilight" - "Cozy: Warm embrace" - "Daily: Arise" - "Daily: Nighttime" - "Daily: Shine" - "Daily: Sleepy" - "Daily: Storybook" - "Daily: Unwind" - "Defaults: Bright" - "Defaults: Concentrate" - "Defaults: Cool bright" - "Defaults: Dimmed" - "Defaults: Energize" - "Defaults: Nightlight" - "Defaults: Read" - "Defaults: Relax" - "Defaults: Rest" - "Dreamy: Adrift" - "Dreamy: Blue lagoon" - "Dreamy: Lake Placid" - "Dreamy: Majestic morning" - "Dreamy: Palm Beach" - "Dreamy: Pensive" - "Dreamy: Still waters" - "Dreamy: Sundown" - "Futuristic: Disturbia" - "Futuristic: Hal" - "Futuristic: Magneto" - "Futuristic: Soho" - "Futuristic: Tyrell" - "Futuristic: Vapor wave" - "Halloween: Glowing grins" - "Halloween: Hocus pocus" - "Halloween: Pandemonium" - "Halloween: Phantom" - "Halloween: Spellbound" - "Halloween: Toil and trouble" - "Halloween: Trick or treat" - "Halloween: Witching hour" - "Harvest hues: Amber robin" - "Harvest hues: Autumn gold" - "Harvest hues: Downtown drizzle" - "Harvest hues: November haze" - "Harvest hues: Pumpkin patch" - "Harvest hues: Pumpkin spice" - "Harvest hues: Woodland toadstool" - "Harvest hues: Fall harvest" - "Lush: Amber bloom" - "Lush: Blue planet" - "Lush: Forest adventure" - "Lush: Lily" - "Lush: Meriete" - "Lush: Orange fields" - "Lush: Painted sky" - "Lush: Winter beauty" - "Luxurious: Emerald flutter" - "Luxurious: Memento" - "Luxurious: Resplendent" - "Luxurious: Scarlet dream" - "Party vibes: Cancun" - "Party vibes: Chinatown" - "Party vibes: Fairfax" - "Party vibes: Ibiza" - "Party vibes: Miami" - "Party vibes: Motown" - "Party vibes: Osaka" - "Party vibes: Rio" - "Party vibes: Tokyo" - "Peaceful: Emerald isle" - "Peaceful: Frosty dawn" - "Peaceful: Lake mist" - "Peaceful: Mountain breeze" - "Peaceful: Ocean dawn" - "Peaceful: Spring blossom" - "Peaceful: Sunday morning" - "Pure: Amethyst valley" - "Pure: Autumn gold" - "Pure: Hazy days" - "Pure: Midsummer sun" - "Pure: Midwinter" - "Pure: Misty ridge" - "Pure: Spring lake" - "Pure: Winter mountain" - "Race Day: Bahrain" - "Race Day: Miami" - "Race Day: Silverstone" - "Race Day: Singapore" - "Race Day: Suzuka" - "Race Day: São Paulo" - "Race Day: Zandvoort" - "Refreshing: Blossom" - "Refreshing: Crocus" - "Refreshing: Narcissa" - "Refreshing: Precious" - "Romantic: City of love" - "Romantic: Glitz and glam" - "Romantic: Lovebirds" - "Romantic: Promise" - "Romantic: Ruby romance" - "Romantic: Smitten" - "Romantic: Sunset allure" - "Serenity: Arctic aurora" - "Serenity: Blood moon" - "Serenity: Galaxy" - "Serenity: Moonlight" - "Serenity: Nebula" - "Serenity: Starlight" - "Sunrise: Beginnings" - "Sunrise: First light" - "Sunrise: Horizon" - "Sunrise: Sunflare" - "Sunrise: Valley dawn" - "Wanderlust: Coastal nights" - "Wanderlust: Island warmth" - "Wanderlust: Ocean escape" - "Wanderlust: Rome" - "Wanderlust: Santorini" - "Winter holidays: Color burst" - "Winter holidays: Crystalline" - "Winter holidays: Festive fun" - "Winter holidays: Golden star" - "Winter holidays: Jolly" - "Winter holidays: Nutcracker" - "Winter holidays: Rosy sparkle" - "Winter holidays: Silent night" - "Winter holidays: Snow sparkle" - "Winter holidays: Under the tree" - "Special: Colorloop" - "Special: Random" - "Special: My scene" multiple: true default_section: name: Script defaults icon: mdi:cogs description: Allows specifying script defaults. Everything set here can be overwritten when the script (i.e., the scene) is started. input: default_scene: name: Default scene description: >- The name of the scene. Can be the simple name (e.g., `Savanna sunset`) or the scene category followed by the scene name (e.g., `Cozy: Savanna sunset`). Note that this is case-sensitive. selector: text: default: Savanna sunset default_repeat_delay: name: Default repeat delay description: The delay between each reassignment of the colors to the lights. Note that very short delays tend to flood the network. If this is set to "0:00:00" here, the script defaults to static scenes. selector: duration: default: hours: 0 minutes: 0 seconds: 0 default_onlyonlights: name: Default for only lights currently on? description: To allow on-the-fly selection of lights, the script can be applied to only those lights that are already on. selector: boolean: null default: false default_use_scene_brightness: name: Use pre-defined scene brightness? description: As of 3.0, the script includes pre-defined brightness settings that come with each scene. If this is set to true, those will be used. selector: boolean: null default: false default_brightness: name: Default brightness description: Default brightness values in case pre-defined values are not used. selector: number: min: 1 max: 100 unit_of_measurement: "%" default: 80 random_section: name: Random description: Settings for random scene icon: mdi:dice-multiple-outline collapsed: true input: hue_min: name: Hue minimum value description: >- Only relevant when scene is "Random". Specifies the minimum hue value to draw from. selector: number: min: 0 max: 359 default: 0 hue_max: name: Hue maximum value description: >- Only relevant when scene is "Random". Specifies the maximum hue value to draw from. selector: number: min: 1 max: 360 default: 360 sat_min: name: Saturation minimum value description: >- Only relevant when scene is "Random". Specifies the minimum saturation value to draw from. selector: number: min: 0 max: 100 default: 99 sat_max: name: Saturation maximum value description: >- Only relevant when scene is "Random". Specifies the maximum saturation value to draw from. selector: number: min: 1 max: 101 default: 101 initial_action: name: Initial action description: >- The action(s) specified here are executed before any light settings are changed. They can be used to, e.g., turn off other effects currently running on the lights. default: [] selector: action: include_mode_color_temp: name: Include bulbs with `color_temp`. description: >- If enabled, the script will always include bulbs that support `color_temp` as color mode. If disabled, the script only include these bulbs for default scenes. default: false selector: boolean: null skipgroups: name: Skip groups description: >- If enabled, group light entities will be skipped. Note that this only applies to the groups defined in Home Assistant. Groups of Zigbee lights defined in the settings of the Zigbee device are not recognized as group. See option `filter_manufacturer"` below. default: true selector: boolean: null filter_manufacturer: name: Filter lighty by manufacturer description: >- If set, lights by that manufacturer will be skipped. This can be used to skip groups defined in the Zigbee controller. E.g., if set to "Silicon Labs" groups created on SkyConnect will be removed. selector: text: default: "" inner_delay: name: Inner delay description: >- Adds a very short delay between sending commands to lights to prevent flooding the network. selector: number: min: 0 max: 2 step: 0.1 unit_of_measurement: "s" default: 0.5 report_entity: default: name: Reporter entity description: >- For proper visualisation, it might be good to know which scene was last activated. If this entity is set, it will always be updated when the script is called. selector: entity: filter: - domain: "input_text" transition: name: Transition time description: How long to move from one color to the next. Not used for color loop. default: 5 selector: number: min: 0 max: 30 unit_of_measurement: s stop_when_lights_turn_off: name: Stop the scene when the number of participating lights changes? description: >- When does the script stop? If set to true (the default), the script stops whenever one of the participating lights is turned off. If set to false, the script runs until it is stopped. This also means that when one of the participating lights is turned off, it will be turned on again. The script needs to be turned off first, then the light. default: true selector: boolean: null debug: name: Generate debug log output? description: >- If true, the script generates a few log messages. default: false selector: boolean: null mode: restart fields: scene: name: Scene description: >- The scene to apply. required: false default: "Cozy: Savanna sunset" example: "Cozy: Savanna sunset" selector: select: options: !input scene_pre_selection repeat_delay: selector: duration: name: Repeat delay default: !input default_repeat_delay example: '{"hours": 0, "minutes": 2, "seconds": 0}' description: >- If set to a time > 0, the script runs in loop mode. After the delay, the script repeats and assigns the colors anew. Please note that the script stops when one of the lights is turned off or it is termined with a service call. required: false onlyonlights: name: Only lights currently on? description: >- If enabled, the scene is only applied to the lights currently on. This is useful if you want to have on-the-fly control over the participating lights. required: false default: !input default_onlyonlights example: "false" selector: boolean: null use_scene_brightness: name: Use predefined scene brightness description: >- If set, the script uses brightness values pre-defined for each scene. required: false default: !input default_use_scene_brightness example: "false" selector: boolean: null brightness: name: Brightness description: >- If set, all lights will be set to the given brightness percentage. In loop mode, brightness is only applied on the first iteration, allowing brightness changes afterwards. example: "50" required: false default: !input default_brightness selector: number: min: 1 max: 100 unit_of_measurement: "%" my_scene: name: Define your own scene with your own colors description: >- Expects a dictionary containing a "c" key. The "c" key contains a list of colors in "XY" format. A valid entry would be: `{"c":[[0.2361,0.2152],[0.2557,0.2325]]}` There is no limit on the number of colors. Specifying a scene here overwrites the selection in the dropdown above (i.e., the field "scene"). required: false selector: object: variables: label: !input label default_scene: !input default_scene default_repeat_delay: !input default_repeat_delay default_onlyonlights: !input default_onlyonlights repeat_delay: >- {{ iif(repeat_delay, repeat_delay, iif(default_repeat_delay, default_repeat_delay, {})) }} report_entity: !input report_entity target: !input target include_mode_color_temp: !input include_mode_color_temp sat_min: !input sat_min sat_max: !input sat_max hue_min: !input hue_min hue_max: !input hue_max filter_manufacturer: !input filter_manufacturer skipgroups: !input skipgroups transition: !input transition stop_when_lights_turn_off: !input stop_when_lights_turn_off debug: !input debug my_scene_int: |- {% if my_scene is defined %} {% set namedict = {"s": "Special", "n": "My scene"} %} {{ dict(my_scene, **namedict) }} {% endif %} scenes: |- {{ {"c":[[0.1969,0.0688],[0.5938,0.261],[0.5535,0.4119],[0.1664,0.5595],[0.6915,0.3083]],"b":0.451,"s":"Halloween","n":"Hocus pocus"}, {"c":[[0.445,0.4067]],"b":0.996,"s":"Defaults","n":"Read"}, {"c":[[0.4247,0.3033],[0.3115,0.2261],[0.2481,0.1608],[0.3409,0.2472],[0.3984,0.3182]],"b":0.678,"s":"Dreamy","n":"Still waters"}, {"c":[[0.6898,0.3075],[0.6236,0.3551],[0.568,0.389],[0.1972,0.0689],[0.2446,0.1235]],"b":0.447,"s":"Halloween","n":"Toil and trouble"}, {"c":[[0.5793,0.392],[0.5099,0.2918],[0.5705,0.272],[0.4703,0.3501],[0.5407,0.4008]],"b":0.796,"s":"Lush","n":"Lily"}, {"c":[[0.1918,0.2296],[0.512,0.318],[0.2829,0.1872],[0.3156,0.4254],[0.4791,0.3551]],"b":0.502,"s":"Romantic","n":"Promise"}, {"c":[[0.1646,0.0531],[0.2773,0.1868],[0.2207,0.083],[0.1827,0.0708],[0.2267,0.1354]],"b":0.502,"s":"Halloween","n":"Pandemonium"}, {"c":[[0.3691,0.3719]],"b":0.996,"s":"Defaults","n":"Concentrate"}, {"c":[[0.5446,0.4265],[0.222,0.5446],[0.1993,0.0703],[0.2085,0.1209],[0.3061,0.568]],"b":0.498,"s":"Halloween","n":"Spellbound"}, {"c":[[0.1645,0.1023],[0.4476,0.4542],[0.4543,0.2814],[0.2285,0.4292],[0.1711,0.2357]],"b":0.753,"s":"Race Day","n":"Singapore"}, {"c":[[0.3143,0.3301]],"b":0.996,"s":"Defaults","n":"Energize"}, {"c":[[0.3864,0.1864],[0.5305,0.261],[0.6587,0.2924],[0.2132,0.3113],[0.1616,0.3754]],"b":0.627,"s":"Futuristic","n":"Disturbia"}, {"c":[[0.457,0.4406],[0.4636,0.4073],[0.4436,0.4271],[0.4714,0.3964],[0.4427,0.4017]],"b":0.796,"s":"Pure","n":"Autumn gold"}, {"c":[[0.1532,0.0479],[0.1569,0.1899],[0.1543,0.0922],[0.589,0.3719],[0.5311,0.4235]],"b":0.451,"s":"Romantic","n":"City of love"}, {"c":[[0.1549,0.1144],[0.1586,0.2169],[0.4197,0.5125],[0.2015,0.6023],[0.3095,0.5913]],"b":0.796,"s":"Lush","n":"Forest adventure"}, {"c":[[0.6364,0.2963],[0.5753,0.3275],[0.5636,0.3912],[0.4759,0.4283],[0.5725,0.3601]],"b":0.392,"s":"Cozy","n":"Honolulu"}, {"c":[[0.2361,0.2152],[0.2557,0.2325],[0.4271,0.4073],[0.2238,0.2028],[0.3836,0.3413]],"b":0.6,"s":"Peaceful","n":"Mountain breeze"}, {"c":[[0.2977,0.2444],[0.25,0.1781],[0.2278,0.1424],[0.2752,0.2042],[0.2883,0.2235]],"b":0.937,"s":"Pure","n":"Amethyst valley"}, {"c":[[0.5259,0.348],[0.5893,0.3531],[0.6615,0.3268],[0.1532,0.0476],[0.1689,0.1281]],"b":0.451,"s":"Halloween","n":"Witching hour"}, {"c":[[0.3517,0.3154],[0.3744,0.2692],[0.359,0.2925],[0.514,0.3338],[0.4435,0.2537]],"b":0.6,"s":"Peaceful","n":"Spring blossom"}, {"c":[[0.45,0.198],[0.5856,0.3736],[0.4007,0.2296],[0.4469,0.273],[0.5565,0.3924]],"b":0.502,"s":"Romantic","n":"Glitz and glam"}, {"c":[[0.3754,0.3602],[0.4258,0.4104],[0.4313,0.4348],[0.3659,0.4529],[0.403,0.382]],"b":0.678,"s":"Peaceful","n":"Sunday morning"}, {"c":[[0.4228,0.4112],[0.4832,0.4251],[0.4451,0.4199],[0.4981,0.4249],[0.4625,0.4217]],"b":0.867,"s":"Pure","n":"Hazy days"}, {"c":[[0.1649,0.1783],[0.5373,0.4003],[0.3135,0.2404],[0.2135,0.1847],[0.4134,0.2962]],"b":0.302,"s":"Sunrise","n":"First light"}, {"c":[[0.2031,0.2342],[0.481,0.4134],[0.4448,0.3857],[0.2556,0.2539],[0.4967,0.414]],"b":0.796,"s":"Sunrise","n":"Sunflare"}, {"c":[[0.1593,0.2346],[0.445,0.448],[0.5393,0.4205],[0.1553,0.0903],[0.1995,0.4599]],"b":0.4,"s":"Winter holidays","n":"Nutcracker"}, {"c":[[0.4134,0.4353],[0.4351,0.4367],[0.5247,0.4185],[0.4532,0.4353],[0.4849,0.4339]],"b":0.984,"s":"Pure","n":"Midsummer sun"}, {"c":[[0.5019,0.2751],[0.5865,0.2575],[0.1916,0.3954],[0.5115,0.3625],[0.2219,0.0825]],"b":0.62,"s":"Futuristic","n":"Soho"}, {"c":[[0.1672,0.593],[0.1915,0.3638],[0.1624,0.4067],[0.1566,0.1795],[0.3314,0.5391]],"b":0.541,"s":"Lush","n":"Blue planet"}, {"c":[[0.1783,0.1212],[0.2299,0.0862],[0.474,0.4378],[0.4039,0.1914],[0.5403,0.4219]],"b":0.776,"s":"Futuristic","n":"Vapor wave"}, {"c":[[0.3161,0.2306],[0.2712,0.1723],[0.1911,0.0673],[0.232,0.2056],[0.3743,0.2727]],"b":0.243,"s":"Serenity","n":"Nebula"}, {"c":[[0.4934,0.3675],[0.5717,0.3983],[0.5341,0.3975],[0.6178,0.3413],[0.5946,0.3811]],"b":0.796,"s":"Lush","n":"Amber bloom"}, {"c":[[0.3826,0.3117],[0.5321,0.2758],[0.4557,0.2951],[0.4189,0.3031],[0.4903,0.2839]],"b":0.4,"s":"Cozy","n":"Ruby glow"}, {"c":[[0.391,0.251],[0.2214,0.1211],[0.4707,0.3508],[0.6206,0.3615],[0.3106,0.1839]],"b":0.796,"s":"Lush","n":"Painted sky"}, {"c":[[0.4777,0.3856],[0.4418,0.3496],[0.5068,0.3702],[0.5321,0.363],[0.4658,0.3667]],"b":0.38,"s":"Winter holidays","n":"Silent night"}, {"c":[[0.5787,0.3787],[0.5242,0.4027],[0.5529,0.3942],[0.4796,0.3959],[0.5015,0.401]],"b":0.451,"s":"Cozy","n":"Rolling hills"}, {"c":[[0.5396,0.4117],[0.5108,0.4192],[0.4833,0.4186],[0.4601,0.415],[0.4369,0.4086]],"b":0.694,"s":"Daily","n":"Storybook"}, {"c":[[0.3951,0.3606],[0.3493,0.209],[0.3904,0.4336],[0.3426,0.242],[0.4384,0.3976]],"b":0.796,"s":"Refreshing","n":"Precious"}, {"c":[[0.4059,0.2562],[0.5652,0.3006],[0.5177,0.269],[0.5829,0.3333],[0.4585,0.2636]],"b":0.302,"s":"Luxurious","n":"Scarlet dream"}, {"c":[[0.6222,0.3604],[0.5532,0.2547],[0.513,0.4237],[0.5935,0.308],[0.4519,0.2677]],"b":0.361,"s":"Party vibes","n":"Osaka"}, {"c":[[0.1623,0.3254],[0.464,0.3618],[0.24,0.3475],[0.304,0.3777],[0.3962,0.4341]],"b":0.502,"s":"Dreamy","n":"Blue lagoon"}, {"c":[[0.6444,0.3207],[0.5977,0.3585],[0.6203,0.325],[0.5609,0.3868],[0.5267,0.409]],"b":0.255,"s":"Daily","n":"Sleepy"}, {"c":[[0.1541,0.081],[0.1778,0.0604],[0.6206,0.3214],[0.1949,0.0678],[0.5967,0.3418]],"b":0.353,"s":"Winter holidays","n":"Festive fun"}, {"c":[[0.2267,0.0832],[0.37,0.2328],[0.3977,0.1832],[0.1586,0.2579],[0.257,0.1754]],"b":0.502,"s":"Futuristic","n":"Tyrell"}, {"c":[[0.1547,0.1045],[0.2044,0.164],[0.4802,0.3112],[0.1743,0.1333],[0.2789,0.2025]],"b":0.647,"s":"Dreamy","n":"Adrift"}, {"c":[[0.3441,0.3135],[0.4125,0.3328],[0.3793,0.3219],[0.3648,0.3209],[0.3955,0.3272]],"b":0.796,"s":"Pure","n":"Misty ridge"}, {"c":[[0.6488,0.2876],[0.5417,0.3551],[0.5992,0.2903],[0.5822,0.3393],[0.5079,0.3289]],"b":0.451,"s":"Romantic","n":"Ruby romance"}, {"c":[[0.2394,0.1596],[0.5881,0.3451],[0.2827,0.189],[0.559,0.3701],[0.5363,0.3986]],"b":0.416,"s":"Romantic","n":"Sunset allure"}, {"c":[[0.1623,0.4022],[0.1838,0.1204],[0.1532,0.0476],[0.549,0.3849],[0.6374,0.3447]],"b":0.396,"s":"Winter holidays","n":"Snow sparkle"}, {"c":[[0.5916,0.3833],[0.485,0.4543],[0.5475,0.4151],[0.4451,0.4556],[0.4759,0.4481]],"b":0.898,"s":"Refreshing","n":"Narcissa"}, {"c":[[0.3812,0.3794]],"b":0.996,"s":"Defaults","n":"Cool bright"}, {"c":[[0.3938,0.3119],[0.4332,0.3513],[0.1882,0.202],[0.1659,0.1712],[0.3373,0.2571]],"b":0.329,"s":"Winter holidays","n":"Crystalline"}, {"c":[[0.5734,0.327],[0.5496,0.3804],[0.5826,0.3426],[0.5687,0.3667],[0.5258,0.3976]],"b":0.4,"s":"Cozy","n":"Warm embrace"}, {"c":[[0.5685,0.4007],[0.6752,0.3004],[0.5649,0.3275],[0.6545,0.295],[0.6362,0.2999]],"b":0.6,"s":"Party vibes","n":"Chinatown"}, {"c":[[0.4925,0.4286],[0.5925,0.3248],[0.189,0.5028],[0.1559,0.1524],[0.4667,0.238]],"b":0.4,"s":"Winter holidays","n":"Jolly"}, {"c":[[0.5953,0.3092],[0.1589,0.2701],[0.2135,0.2508],[0.4846,0.4442],[0.5641,0.3328]],"b":0.757,"s":"Futuristic","n":"Hal"}, {"c":[[0.248,0.2567],[0.3835,0.3261],[0.4237,0.3449],[0.4082,0.3661],[0.2263,0.2095]],"b":0.647,"s":"Peaceful","n":"Lake mist"}, {"c":[[0.1572,0.202],[0.1545,0.0715],[0.1532,0.0476],[0.1598,0.3036],[0.1561,0.1586]],"b":0.529,"s":"Party vibes","n":"Motown"}, {"c":[[0.4215,0.4895],[0.1593,0.1341],[0.516,0.4401],[0.1575,0.2128],[0.171,0.3389]],"b":0.878,"s":"Futuristic","n":"Magneto"}, {"c":[[0.2242,0.0946],[0.4485,0.3245],[0.4634,0.2642],[0.3481,0.1913],[0.4195,0.445]],"b":0.643,"s":"Race Day","n":"Suzuka"}, {"c":[[0.2459,0.2693],[0.555,0.3606],[0.192,0.1686],[0.5948,0.3442],[0.4848,0.3887]],"b":0.502,"s":"Dreamy","n":"Sundown"}, {"c":[[0.4596,0.4105]],"b":0.996,"s":"Defaults","n":"Bright"}, {"c":[[0.6777,0.3085],[0.189,0.5037],[0.1711,0.6741],[0.5075,0.44],[0.523,0.3581]],"b":0.4,"s":"Winter holidays","n":"Under the tree"}, {"c":[[0.5063,0.4474],[0.5584,0.4083],[0.5695,0.3999],[0.482,0.4489],[0.496,0.4424]],"b":0.647,"s":"Cozy","n":"Golden pond"}, {"c":[[0.6049,0.3396],[0.1544,0.0725],[0.1768,0.0889],[0.2239,0.0883],[0.3786,0.2083]],"b":0.549,"s":"Halloween","n":"Trick or treat"}, {"c":[[0.4675,0.3769],[0.439,0.3782],[0.4221,0.386],[0.387,0.4328],[0.4013,0.4172]],"b":0.796,"s":"Peaceful","n":"Frosty dawn"}, {"c":[[0.3041,0.2368],[0.1596,0.0684],[0.3918,0.2958],[0.1803,0.1298],[0.465,0.3446]],"b":0.204,"s":"Serenity","n":"Blood moon"}, {"c":[[0.4596,0.4105]],"b":0.302,"s":"Defaults","n":"Dimmed"}, {"c":[[0.6571,0.2954],[0.5353,0.4035],[0.5939,0.379],[0.6309,0.3339],[0.3134,0.5923]],"b":0.471,"s":"Halloween","n":"Glowing grins"}, {"c":[[0.1868,0.3328],[0.1581,0.1508],[0.1541,0.0844],[0.2072,0.4525],[0.2359,0.3855]],"b":0.263,"s":"Serenity","n":"Arctic aurora"}, {"c":[[0.4692,0.4536],[0.5353,0.2909],[0.5527,0.2686],[0.2588,0.1266],[0.5473,0.3735]],"b":0.796,"s":"Party vibes","n":"Rio"}, {"c":[[0.2099,0.344],[0.1695,0.3125],[0.319,0.3996],[0.1593,0.25],[0.1569,0.1897]],"b":0.4,"s":"Luxurious","n":"Emerald flutter"}, {"c":[[0.3979,0.413],[0.5471,0.3588],[0.4741,0.43],[0.4659,0.3561],[0.1879,0.0644]],"b":0.569,"s":"Dreamy","n":"Majestic morning"}, {"c":[[0.5189,0.3924],[0.5493,0.3702],[0.4416,0.2813],[0.4996,0.293],[0.5579,0.3308]],"b":0.502,"s":"Cozy","n":"Dreamy dusk"}, {"c":[[0.4387,0.3739],[0.3133,0.2061],[0.2213,0.1346],[0.3787,0.2792],[0.4228,0.3349]],"b":0.243,"s":"Serenity","n":"Starlight"}, {"c":[[0.4216,0.3347],[0.5135,0.348],[0.4656,0.3479],[0.2444,0.253],[0.194,0.1927]],"b":0.302,"s":"Dreamy","n":"Lake Placid"}, {"c":[[0.3678,0.1839],[0.154,0.0799],[0.5573,0.3226],[0.1561,0.1606],[0.4548,0.2433]],"b":0.796,"s":"Party vibes","n":"Miami"}, {"c":[[0.6813,0.3034],[0.4812,0.4456],[0.5717,0.3975],[0.5057,0.4345],[0.6233,0.3222]],"b":0.459,"s":"Winter holidays","n":"Golden star"}, {"c":[[0.4746,0.2932],[0.5347,0.3333],[0.5285,0.3165],[0.5353,0.3501],[0.5508,0.3704]],"b":0.6,"s":"Romantic","n":"Smitten"}, {"c":[[0.4412,0.279],[0.4845,0.2799],[0.3502,0.1943],[0.4844,0.2608],[0.5351,0.3287]],"b":0.251,"s":"Serenity","n":"Galaxy"}, {"c":[[0.188,0.4536],[0.1859,0.2404],[0.2996,0.4535],[0.4154,0.4646],[0.4421,0.4811]],"b":0.753,"s":"Race Day","n":"São Paulo"}, {"c":[[0.2108,0.2047],[0.1532,0.0476],[0.3557,0.3352],[0.1725,0.1532],[0.1547,0.1074]],"b":0.204,"s":"Serenity","n":"Moonlight"}, {"c":[[0.6776,0.3015],[0.1935,0.2353],[0.613,0.3132],[0.1583,0.2465],[0.4818,0.321]],"b":0.62,"s":"Party vibes","n":"Fairfax"}, {"c":[[0.5561,0.3443],[0.3664,0.2621],[0.5413,0.3873],[0.2329,0.1662],[0.4918,0.3272]],"b":0.561,"s":"Dreamy","n":"Pensive"}, {"c":[[0.1708,0.2751],[0.2245,0.2928],[0.5334,0.4045],[0.4785,0.3995],[0.5896,0.3706]],"b":0.592,"s":"Race Day","n":"Bahrain"}, {"c":[[0.561,0.4042]],"b":0.004,"s":"Defaults","n":"Nightlight"}, {"c":[[0.1862,0.216],[0.494,0.4139],[0.3926,0.3226],[0.2195,0.2166],[0.4996,0.4026]],"b":0.698,"s":"Sunrise","n":"Valley dawn"}, {"c":[[0.4636,0.4138],[0.1685,0.055],[0.2943,0.1842],[0.1547,0.1072],[0.2092,0.1108]],"b":0.796,"s":"Lush","n":"Meriete"}, {"c":[[0.1731,0.1978],[0.5182,0.4136],[0.2779,0.2188],[0.1811,0.1979],[0.5247,0.3877]],"b":0.502,"s":"Sunrise","n":"Horizon"}, {"c":[[0.5949,0.2738],[0.244,0.1708],[0.522,0.3471],[0.2209,0.2477],[0.5236,0.386]],"b":0.596,"s":"Race Day","n":"Silverstone"}, {"c":[[0.1554,0.0996],[0.1729,0.146],[0.4964,0.4542],[0.1824,0.0807],[0.1671,0.0853]],"b":0.4,"s":"Luxurious","n":"Memento"}, {"c":[[0.5121,0.4371],[0.6156,0.2808],[0.6696,0.3237],[0.5352,0.2797],[0.6153,0.3655]],"b":0.796,"s":"Party vibes","n":"Cancun"}, {"c":[[0.4105,0.2205],[0.5124,0.3609],[0.2392,0.125],[0.4661,0.2915],[0.3223,0.1916]],"b":0.302,"s":"Luxurious","n":"Resplendent"}, {"c":[[0.293,0.3236],[0.2484,0.3089],[0.252,0.3108],[0.273,0.3175],[0.2376,0.3042]],"b":0.878,"s":"Pure","n":"Winter mountain"}, {"c":[[0.4195,0.4216],[0.3818,0.485],[0.2877,0.2519],[0.2194,0.1332],[0.4212,0.38]],"b":0.796,"s":"Refreshing","n":"Crocus"}, {"c":[[0.4949,0.3565],[0.4366,0.3393],[0.4914,0.3119],[0.4435,0.2571],[0.3613,0.2005]],"b":0.38,"s":"Winter holidays","n":"Rosy sparkle"}, {"c":[[0.6584,0.3021],[0.6182,0.352],[0.645,0.3288],[0.5819,0.3813],[0.5375,0.404]],"b":0.067,"s":"Daily","n":"Nighttime"}, {"c":[[0.1621,0.3061],[0.5573,0.3409],[0.5335,0.3789],[0.2007,0.2178],[0.5371,0.2735]],"b":0.753,"s":"Race Day","n":"Miami"}, {"c":[[0.5119,0.4249],[0.3972,0.4025],[0.4419,0.4164],[0.2674,0.3018],[0.24,0.2761]],"b":0.796,"s":"Refreshing","n":"Blossom"}, {"c":[[0.4271,0.4052],[0.4043,0.3858],[0.385,0.3743],[0.3671,0.3629],[0.3472,0.348]],"b":0.996,"s":"Daily","n":"Arise"}, {"c":[[0.2258,0.3244],[0.5217,0.3592],[0.1597,0.2673],[0.1568,0.1681],[0.4281,0.3412]],"b":0.4,"s":"Halloween","n":"Phantom"}, {"c":[[0.4724,0.4728],[0.5701,0.3995],[0.3547,0.5613],[0.5628,0.3479],[0.5013,0.4511]],"b":0.796,"s":"Lush","n":"Orange fields"}, {"c":[[0.5614,0.406],[0.1753,0.0585],[0.1562,0.1626],[0.5894,0.2589],[0.2676,0.103]],"b":0.471,"s":"Party vibes","n":"Tokyo"}, {"c":[[0.5208,0.4183],[0.495,0.4193],[0.4728,0.4174],[0.4481,0.4124],[0.4238,0.4037]],"b":0.996,"s":"Daily","n":"Shine"}, {"c":[[0.1587,0.1368],[0.3537,0.2546],[0.1914,0.1543],[0.1652,0.1455],[0.2726,0.2045]],"b":0.204,"s":"Sunrise","n":"Beginnings"}, {"c":[[0.561,0.4042]],"b":0.353,"s":"Defaults","n":"Rest"}, {"c":[[0.4143,0.3548],[0.3688,0.3106],[0.2847,0.2449],[0.4299,0.3951],[0.4416,0.3743]],"b":0.839,"s":"Peaceful","n":"Ocean dawn"}, {"c":[[0.3188,0.1278],[0.6495,0.288],[0.5702,0.3307],[0.1813,0.1037],[0.4515,0.4742]],"b":0.302,"s":"Winter holidays","n":"Color burst"}, {"c":[[0.5019,0.4152]],"b":0.561,"s":"Defaults","n":"Relax"}, {"c":[[0.5691,0.3512],[0.4824,0.3325],[0.3888,0.2997],[0.2576,0.3185],[0.2007,0.3418]],"b":0.38,"s":"Dreamy","n":"Palm Beach"}, {"c":[[0.4162,0.4341],[0.5862,0.3575],[0.644,0.3348],[0.5246,0.3864],[0.4801,0.4309]],"b":0.58,"s":"Cozy","n":"Savanna sunset"}, {"c":[[0.5974,0.36],[0.5286,0.4068],[0.5714,0.3806],[0.4376,0.4577],[0.4787,0.4495]],"b":0.49,"s":"Party vibes","n":"Ibiza"}, {"c":[[0.4216,0.4437],[0.3281,0.4921],[0.1784,0.3104],[0.2137,0.49],[0.5353,0.4074]],"b":0.796,"s":"Lush","n":"Winter beauty"}, {"c":[[0.5528,0.3806],[0.5787,0.393],[0.5149,0.4116],[0.5014,0.4153],[0.5202,0.4369]],"b":0.396,"s":"Romantic","n":"Lovebirds"}, {"c":[[0.3348,0.3611],[0.3351,0.425],[0.339,0.4042],[0.3308,0.3798],[0.3414,0.3868]],"b":0.945,"s":"Pure","n":"Spring lake"}, {"c":[[0.5796,0.3787],[0.5114,0.4192],[0.5594,0.4008],[0.5369,0.4148],[0.4849,0.4189]],"b":0.447,"s":"Daily","n":"Unwind"}, {"c":[[0.1621,0.1817],[0.5462,0.3602],[0.389,0.4329],[0.2237,0.2599],[0.5087,0.4226]],"b":0.843,"s":"Race Day","n":"Zandvoort"}, {"c":[[0.4648,0.4254],[0.3924,0.4132],[0.2709,0.3235],[0.255,0.4176],[0.3134,0.4131]],"b":0.749,"s":"Peaceful","n":"Emerald isle"}, {"c":[[0.2636,0.2755],[0.2221,0.2196],[0.2636,0.2508],[0.2377,0.2547],[0.2091,0.1898]],"b":0.886,"s":"Pure","n":"Midwinter"}, {"c":[[0.363,0.2716],[0.4731,0.3723],[0.5813,0.3636],[0.2412,0.1171],[0.3044,0.1803]],"b":0.439,"s":"Cozy","n":"Tropical twilight"}, {"c":[[0.4299,0.4725],[0.4458,0.4192],[0.4771,0.4018],[0.5217,0.3784],[0.6136,0.3421]],"b":0.8,"s":"Harvest hues","n":"Woodland toadstool"}, {"c":[[0.5581,0.3918],[0.5276,0.4012],[0.4939,0.4025],[0.4451,0.4199],[0.3862,0.4237]],"b":0.6,"s":"Harvest hues","n":"Fall harvest"}, {"c":[[0.5563,0.3914],[0.5412,0.3956],[0.4768,0.3669],[0.4087,0.3382],[0.3641,0.3383]],"b":0.7,"s":"Harvest hues","n":"Pumpkin spice"}, {"c":[[0.4824,0.3932],[0.5371,0.4008],[0.5547,0.3597],[0.5667,0.3343],[0.2821,0.1821]],"b":0.55,"s":"Harvest hues","n":"November haze"}, {"c":[[0.4661,0.4089],[0.4882,0.4243],[0.5217,0.4365],[0.5563,0.4005],[0.5825,0.3786]],"b":0.75,"s":"Harvest hues","n":"Amber robin"}, {"c":[[0.1658,0.3642],[0.2096,0.3991],[0.4512,0.4062],[0.4834,0.3818],[0.5263,0.3664]],"b":0.45,"s":"Harvest hues","n":"Pumpkin patch"}, {"c":[[0.6812,0.3084],[0.5116,0.3115],[0.5532,0.3704],[0.5932,0.3896],[0.4765,0.4371]],"b":0.29,"s":"Harvest hues","n":"Downtown drizzle"}, {"c":[[0.457,0.4406],[0.4636,0.4073],[0.4436,0.4271],[0.4714,0.3964],[0.4427,0.4017]],"b":0.796,"s":"Harvest hues","n":"Autumn gold"}, {"c":[[0.3258,0.3722],[0.3573,0.3607],[0.3855,0.3582],[0.4246,0.3914],[0.4651,0.4502]],"b":0.9,"s":"Wanderlust","n":"Rome"}, {"c":[[0.2901,0.3044],[0.3332,0.3487],[0.3605,0.3708],[0.3921,0.3869],[0.4262,0.3693]],"b":0.8,"s":"Wanderlust","n":"Santorini"}, {"c":[[0.4171,0.3962],[0.4379,0.4044],[0.4693,0.3698],[0.5022,0.3031],[0.3032,0.2117]],"b":0.65,"s":"Wanderlust","n":"Coastal nights"}, {"c":[[0.3402,0.4451],[0.3208,0.3554],[0.3607,0.3855],[0.3924,0.3918],[0.4152,0.3907]],"b":1.00,"s":"Wanderlust","n":"Ocean escape"}, {"c":[[0.5052,0.4257],[0.4803,0.4201],[0.4456,0.3920],[0.4148,0.3805],[0.3907,0.3652]],"b":0.61,"s":"Wanderlust","n":"Island warmth"}, {"c":[ [ range(hue_min|default(0),hue_max|default(360))|random,range(sat_min|default(99),sat_max|default(101))|random ], [ range(hue_min|default(0),hue_max|default(360))|random,range(sat_min|default(99),sat_max|default(101))|random ], [ range(hue_min|default(0),hue_max|default(360))|random,range(sat_min|default(99),sat_max|default(101))|random ], [ range(hue_min|default(0),hue_max|default(360))|random,range(sat_min|default(99),sat_max|default(101))|random ], [ range(hue_min|default(0),hue_max|default(360))|random,range(sat_min|default(99),sat_max|default(101))|random ], ],"b": 0.9,"s":"Special","n":"Random"}, {"c":[],"b": 0.9,"s":"Special","n":"Colorloop"}, my_scene_int }} scene_name: |- {% if my_scene is defined %} {% set scene = "Special: My scene" %} {% elif not scene and default_scene %} {% set scene = default_scene %} {% endif %} {% if ":" in scene %} {% set split_scene = scene.split(":") %} {{scenes | selectattr('n', 'eq', split_scene[1] | trim) | selectattr('s', 'eq', split_scene[0]) | first | default('') }} {% else %} {{scenes | selectattr('n', 'eq', scene) | first | default('') }} {% endif %} brightness_value: |- {% if my_scene %} {{ brightness }} {% elif use_scene_brightness %} {{ (scene_name.b*100)|round(0, 'ceil') }} {% elif brightness %} {{ brightness }} {% else %} x {% endif %} lights: |- {% set ns = namespace(areas=[], l=[], lights_temporary=[]) %} ## collect areas {% if target.area_id is defined %} {% if target.area_id is iterable and not target.area_id is string %} {% set ns.areas = ns.areas + target.area_id %} {% else %} {% set ns.areas = ns.areas + [target.area_id] %} {% endif %} {% endif %} {% if target.floor_id is defined %} {% if target.floor_id is iterable and not target.floor_id is string %} {% for f in target.floor_id %} {% set ns.areas = ns.areas + floor_areas(f) %} {% endfor %} {% else %} {% set ns.areas = ns.areas + floor_areas(target.floor_id) %} {% endif %} {% endif %} ## process areas {% for a in ns.areas %} {% set ns.l = ns.l + area_entities(a)|select('match', 'light.')|list %} {% endfor %} {% if target.entity_id is defined %} {% if target.entity_id is iterable and not target.entity_id is string %} {% set ns.l = ns.l + (target.entity_id|list) %} {% else %} {% set ns.l = ns.l + [target.entity_id] %} {% endif %} {% endif %} ## process devices {% if target.device_id is defined %} {% if target.device_id is iterable and not target.device_id is string %} {% for f in target.device_id %} {% set ns.l = ns.l + device_entities(f)|select('match', 'light.')|list %} {% endfor %} {% else %} {% set ns.l = ns.l + device_entities(target.device_id)|select('match', 'light.')|list %} {% endif %} {% endif %} ## process labels {% if target.label_id is defined %} {% if target.label_id is iterable and not target.label_id is string %} {% for a in target.label_id %} {% set ns.l = ns.l + label_entities(a)|select('match', 'light.')|list %} {% endfor %} {% else %} {% set ns.l = ns.l + label_entities(target.label_id)|select('match', 'light.')|list %} {% endif %} {% endif %} {% if skipgroups|default(true) %} {% set ns.l = expand(ns.l) | rejectattr('attributes.entity_id', 'defined') | map(attribute = "entity_id") | list %} {% endif %} {% if onlyonlights|default(false) %} {% set ns.l = ns.l | select('is_state', 'on') %} {% endif %} {% if filter_manufacturer is defined %} {% set ns.lights_temporary = [] %} {%- for ll in ns.l -%} {%- if device_attr(device_id(ll), "manufacturer") != filter_manufacturer -%} {% set ns.lights_temporary = ns.lights_temporary + [ll] %} {% endif %} {%- endfor -%} {% set ns.l = ns.lights_temporary|list %} {% endif %} {% set ns.lights_temporary = [] %} {%- for ll in ns.l %} {%- set colormodes = state_attr(ll, "supported_color_modes") -%} {%- if (intersect(colormodes, ["xy", "rgb", "rgbw", "hs"]) | count > 0) or (include_mode_color_temp and "color_temp" in colormodes) or (not include_mode_color_temp and scene_name.n in ["Bright", "Concentrate", "Cool bright", "Dimmed", "Energize", "Nightlight", "Read", "Relax", "Rest"]) -%} {% set ns.lights_temporary = ns.lights_temporary + [ll] %} {%- endif -%} {%- endfor -%} {% set ns.l = ns.lights_temporary|list %} {{ ns.l }} sequence: - choose: - conditions: "{{ lights | count == 0 }}" sequence: - stop: "No lights available" - choose: - conditions: "{{ report_entity is defined }}" sequence: - action: input_text.set_value data: value: "{{ scene_name.n }}" target: entity_id: !input report_entity - if: "{{ debug }}" then: - action: logbook.log data: name: "{{ this.attributes.friendly_name }}" message: >- Running dynamic scene {{ scene }} with {{ lights|length }} lights: {{ lights|list }}. entity_id: "{{ this.entity_id }}" - if: "{{ label != null and integration_entities('spook')|length > 0 }}" then: - variables: labelled_lights: "{{ label_entities(label) }}" - action: homeassistant.remove_label_from_entity data: label_id: "{{ label }}" entity_id: "{{ labelled_lights }}" - action: homeassistant.add_label_to_entity data: label_id: "{{ label }}" entity_id: "{{ lights }}" - sequence: !input initial_action - repeat: while: >- {{ (repeat.index == 1) or ( (repeat_delay.hours > 0 or repeat_delay.minutes > 0 or repeat_delay.seconds > 0) and (stop_when_lights_turn_off == False) ) or ( (repeat_delay.hours > 0 or repeat_delay.minutes > 0 or repeat_delay.seconds > 0) and (( lights | list | count ) == (lights | select('is_state', 'on') | list | count)) ) }} sequence: - if: "{{ debug }}" then: - action: logbook.log data: name: "{{ this.attributes.friendly_name }}" message: >- Entering loop {{ repeat.index }} entity_id: "{{ this.entity_id }}" - variables: colors: |- # shuffle color order {% set ns = namespace(x = scene_name.c) %} {% for i in range(ns.x | length - 1, 0, -1) %} {% set j = range(0, i + 1) | random %} {% if j != i %} {% set ns.x = ns.x[:j]+[ns.x[i]]+ns.x[j+1:i]+[ns.x[j]]+ns.x[i+1:] %} {% endif %} {% endfor %} {{ ns.x }} first: "{{ repeat.index == 1}}" - repeat: for_each: "{{ lights }}" sequence: - variables: datadict: |- {# Macro generated by Claude and adapted #} {% macro xy_to_rgb(x, y, Y=1.0, scale_to_255=true) %} {# Step 1: Convert xy to XYZ #} {%- set X = (x * Y) / y -%} {%- set Z = ((1 - x - y) * Y) / y -%} {# Step 2: Convert XYZ to linear RGB using sRGB matrix #} {%- set linear_r = 3.2406 * X - 1.5372 * Y - 0.4986 * Z -%} {%- set linear_g = -0.9689 * X + 1.8758 * Y + 0.0415 * Z -%} {%- set linear_b = 0.0557 * X - 0.2040 * Y + 1.0570 * Z -%} {# Step 3: Apply gamma correction #} {%- set gamma_r = 12.92 * linear_r if linear_r <= 0.0031308 else 1.055 * (linear_r ** (1/2.4)) - 0.055 -%} {%- set gamma_g = 12.92 * linear_g if linear_g <= 0.0031308 else 1.055 * (linear_g ** (1/2.4)) - 0.055 -%} {%- set gamma_b = 12.92 * linear_b if linear_b <= 0.0031308 else 1.055 * (linear_b ** (1/2.4)) - 0.055 -%} {# Step 4: Clamp values to 0-1 range #} {%- set clamped_r = [0, [gamma_r, 1] | min] | max -%} {%- set clamped_g = [0, [gamma_g, 1] | min] | max -%} {%- set clamped_b = [0, [gamma_b, 1] | min] | max -%} {# Step 5: Scale to 0-255 if requested, otherwise return 0-1 range #} {%- if scale_to_255 -%} {{ [ (clamped_r * 255) | round | int, (clamped_g * 255) | round | int, (clamped_b * 255) | round | int ] }} {%- else -%} {{ [ clamped_r, clamped_g, clamped_b ] }} {%- endif -%} {% endmacro %} {% if scene_name.n == "Colorloop" %} {% set oldcol = state_attr(repeat.item, "hs_color") %} {% if first or (oldcol == None) %} {% set dd = {"hs_color": [ range(hue_min|default(0),hue_max|default(360))|random, range(sat_min|default(99),sat_max|default(101))|random] } %} {% else %} {% set dd = { "hs_color": [(oldcol[0]+10)%360,oldcol[1]], "transition": ( repeat_delay.hours*60*60 + repeat_delay.minutes*60 + repeat_delay.seconds ) } %} {% endif %} {% elif scene_name.n == "Random" %} {% set xy = colors[repeat.index % colors|length] %} {% set dd = {"hs_color": [xy|first, xy|last] } %} {% else %} {% if state_attr(repeat.item, "supported_color_modes") == ["rgbw"] %} {% set xy = colors[repeat.index % colors|length] %} {% set dd = {"rgbw_color": (xy_to_rgb(xy|first, xy|last) | from_json) + [0] } %} {% elif state_attr(repeat.item, "supported_color_modes") == ["rgb"] %} {% set xy = colors[repeat.index % colors|length] %} {% set dd = {"rgb_color": xy_to_rgb(xy|first, xy|last) | from_json } %} {% else %} {% set xy = colors[repeat.index % colors|length] %} {% set dd = {"xy_color": [xy|first, xy|last] } %} {% endif %} {% endif %} {% if brightness_value != "x" and first %} {% set bd = {"brightness_pct": brightness_value } %} {% set dd = dict(dd, **bd) %} {% endif %} {% if transition and scene != "Colorloop" %} {% set bd = {"transition": transition } %} {% set dd = dict(dd, **bd) %} {% endif %} {{ dd }} - action: light.turn_on data: "{{ datadict }}" target: entity_id: "{{ repeat.item }}" - delay: !input inner_delay - if: "{{ stop_when_lights_turn_off }}" then: - wait_for_trigger: - trigger: template value_template: "{{ (( lights | list | count ) != (lights | select('is_state', 'on') | list | count)) }}" timeout: "{{ repeat_delay }}" else: - if: "{{ repeat_delay.hours > 0 or repeat_delay.minutes > 0 or repeat_delay.seconds > 0 }}" then: - delay: "{{ repeat_delay }}"