{"id":20703796,"url":"https://github.com/mochman/node-red-contrib-light-transition","last_synced_at":"2026-03-13T12:32:24.851Z","repository":{"id":41894073,"uuid":"401967021","full_name":"mochman/node-red-contrib-light-transition","owner":"mochman","description":"Node-red light transition","archived":false,"fork":false,"pushed_at":"2025-10-30T18:39:09.000Z","size":560,"stargazers_count":9,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T18:47:58.182Z","etag":null,"topics":["light","node-red","sunrise","sunset","transition","wakeup"],"latest_commit_sha":null,"homepage":"https://flows.nodered.org/node/node-red-contrib-light-transition","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mochman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-01T07:13:02.000Z","updated_at":"2025-10-30T18:38:39.000Z","dependencies_parsed_at":"2024-11-03T00:02:58.858Z","dependency_job_id":"f10c5980-50a7-40a2-af96-cb610108f3ca","html_url":"https://github.com/mochman/node-red-contrib-light-transition","commit_stats":{"total_commits":105,"total_committers":4,"mean_commits":26.25,"dds":"0.19999999999999996","last_synced_commit":"59725ce4d05c37cf882c0693c0b5b14780437b2a"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/mochman/node-red-contrib-light-transition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochman%2Fnode-red-contrib-light-transition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochman%2Fnode-red-contrib-light-transition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochman%2Fnode-red-contrib-light-transition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochman%2Fnode-red-contrib-light-transition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mochman","download_url":"https://codeload.github.com/mochman/node-red-contrib-light-transition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mochman%2Fnode-red-contrib-light-transition/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30467383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["light","node-red","sunrise","sunset","transition","wakeup"],"created_at":"2024-11-17T01:09:35.663Z","updated_at":"2026-03-13T12:32:24.836Z","avatar_url":"https://github.com/mochman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eLight Transition for node-red\u003c/h1\u003e \n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/mochman/node-red-contrib-light-transition/actions/workflows/tests.yml\"\u003e\u003cimg src=\"https://github.com/mochman/node-red-contrib-light-transition/actions/workflows/tests.yml/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/mochman/node-red-contrib-light-transition/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/mochman/node-red-contrib-light-transition\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/node-red-contrib-light-transition\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/node-red-contrib-light-transition\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## **Overview:**\n\nThis node takes in a starting color and brightness and slowly changes them to meet an ending color and brightness.\n\nThis project is based on **[node-red-contrib-looptimer-advanced](https://github.com/Haxiboy/node-red-contrib-looptimer-advanced)** and some extra code to slowly change the brightness and color of a light over a programmable time.\n\nThis node was created to help with lights in Home Assistant that don't work with the built in _transition_ command. The node will output a `msg.payload` containing:\n\n```\n{\n  \"brightness_pct\": \u003c1-100\u003e,\n  \"brightness\": \u003c1-255\u003e,\n  \"rgb_color\": [\u003c0-255\u003e,\u003c0-255\u003e,\u003c0-255\u003e],\n  \"color_temp\": \u003cInteger\u003e,\n  \"color_temp_kelvin\": \u003cInteger\u003e,\n}\n```\n\nthat can be used with a call service node to incrementally change the color and brightness of the light.\n\n## **Installation:**\n\n\u003e npm install node-red-contrib-light-transition\n\n## **Configuration:**\n\nThis node can be configured manually or by passing it a specific payload. The manual settings are:\n\n- **Total Time** - Amount of time you want the light to take to get from the beginning color/brightness to the end.\n- **\\# of steps** - Total amount of increments to take to get from the beginging to the end. A higher number will make for a smoother transition.\n- **Starting color** - Initial color of the light.\n- **Intermediate color** - The color that will be transitioned through from beginning to end.\n- **Ending color** - The final color the light will be at the end of the Total Time.\n- **Starting mireds** - The initial mired value (called color_temp in Home Assistant light entities).\n- **Ending mireds** - The final mired value.\n- **Starting Brightness** - Initial brightness of the light.\n- **Ending Brightness** - Final brightness ot the light.\n- **Brightness Type** - Select brightness scale.\n  - **Percent** - Uses 1-100 for brightness input.\n  - **Integer** - Uses 1-255 for brightness input.\n- **Transition Style** - How the brightness changes over time.\n  - **Linear** - Changes the brightness the same from beginning to end.\n  - **Exponential** - Changes the brightess slowly at the begining then with bigger increments towards the end of the loop.\n- **Color Transition Style** - How the color changes over time.\n  - **Weighted** - Uses the [\"redmean\" distance approximation](https://en.wikipedia.org/wiki/Color_difference#sRGB) to determine the amount of change between the colors. It adjusts the number of steps based on the difference in the change between the Start-\u003eTransition \u0026 Transition-\u003eEnd \"distances\".\n  - **Half \u0026 Half** - Just splits the number of total steps in half so the transition color will be in the middle.\n  - **None** - Disregards the transition color entirely and changes the color from Start-\u003eEnd.\n\nThe node can also be configured by sending it a specific `msg.transition` object:\n\n```\n{\n  \"duration\": 15,                     //Total Time\n  \"units\": \"Minute\",                  //Can be \"Second\", \"Minute\", or \"Hour\"\n  \"steps\": 30,                        //# of steps\n  \"startRGB\": '#ff0000',              //RGB color to start from\n  \"transitionRGB\": '#ffff00',         //RGB color to transition through\n  \"endRGB\": '#ffffff',                //RGB color to end at\n  \"startMired\": 160,                  //Mired value to begin at\n  \"endMired\": 600,                    //Mired value to end at\n  \"startBright\": 1,                   //Starting brightness\n  \"endBright\": 100,                   //Ending brightness\n  \"brightnessType\": \"Percent\",        //Brightness values selector.  Can be \"Percent\" or \"Integer\"\n  \"transitionType\": \"Linear\",         //Can be \"Linear\" or \"Exponential\"\n  \"colorTransitionType\" : \"Weighted\"  //Can be \"Weighted\", \"Half\", or \"None\"\n}\n```\n\n### **Note:** _Do not keep the comments in the actual msg.transition object, they are for reference only._\n\nAny time a `msg.transition` is sent to the node, the settings are changed and the loop is started from the beginning again.\n\nThis node will stop running when it has reached the last step. It will send a `msg.payload` of `complete` out of the second output on the node.\nYou can also manually stop the node by sending a `msg.payload` of `stop` or `STOP`. The node will end its loop and send a `msg.payload` of `stopped` out of the second output.\n\n## **Localization**\n\nIf you would like to help with translating, please see the [locales](https://github.com/mochman/node-red-contrib-light-transition/tree/main/locales) folder for examples of what needs to be translated.\n\n## **Notes**\n\n- If the \"Weighted\" color transition is changing colors too fast, try using the \"Half \u0026 Half\" transition type.\n- Using the \"Exponential\" transition type with a small number of \"steps\" will cause large brightness changes near the end. It's best to use a higher number of steps to make sure the brightness transition is smooth.\n\n## **Examples**\n\n1. If you want to configure the node without using the node options, you can send it a `msg.transition` object:\n\n![](https://github.com/mochman/node-red-contrib-light-transition/blob/main/images/configure_dynamic.png?raw=true)\n\n- _Here is the config for the Configuration Node:_\n\n![](https://github.com/mochman/node-red-contrib-light-transition/blob/main/images/dynamic_settings.png?raw=true)\n\n2. In this example, you have one light that has both color \u0026 white light, but doesn't let you send a `rgbw_color` value to it.\n\n![](https://github.com/mochman/node-red-contrib-light-transition/blob/main/images/multiple_flow.png?raw=true)\n\n- The first transition node changes the color from red to yellow with a Half \u0026 Half transition. The Brightness changes from 1 to 100% with a linear transition. It also changes the mireds from 100 to 800.\n\n![](https://github.com/mochman/node-red-contrib-light-transition/blob/main/images/node_settings.png?raw=true)\n\n- The first \"Turn LEDs on\" node accepts JSONata data like this:\n\n![](https://github.com/mochman/node-red-contrib-light-transition/blob/main/images/call_service.png?raw=true)\n![](https://github.com/mochman/node-red-contrib-light-transition/blob/main/images/jsonata.png?raw=true)\n\n- The \"Complete\" switch node only passes a message when the `msg.payload` = `complete`. This ensures that the second node won't get started when a stop command is sent to the first node since the nodes will send a `stopped` message when forced to stop.\n\n- The second transition node changes the mireds from 525 (warm) to 160 (cool). The Brightness changes from 100 to 0% with an exponential transision.\n\n![](./images/node_settings2.png)\n\n- The second \"Turn LEDs on\" node accepts JSONata data like this:\n\n![](https://github.com/mochman/node-red-contrib-light-transition/blob/main/images/call_service.png?raw=true)\n![](https://github.com/mochman/node-red-contrib-light-transition/blob/main/images/jsonata2.png?raw=true)\n\n## **Changelog**\n\n[The change log can be found here](https://github.com/mochman/node-red-contrib-light-transition/blob/main/CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmochman%2Fnode-red-contrib-light-transition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmochman%2Fnode-red-contrib-light-transition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmochman%2Fnode-red-contrib-light-transition/lists"}