# Light automation

**URL:** <https://discourse.nodered.org/t/light-automation/22090>\
**Category:** General\
**Created:** [22 February 2020 11:16 UTC](https://discourse.nodered.org/t/light-automation/22090 "2020-02-22T11:16:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![flixlix](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@flixlix](https://discourse.nodered.org/u/flixlix)\
**Post date:** [22 February 2020 11:16 UTC](https://discourse.nodered.org/t/light-automation/22090/1 "2020-02-22T11:16:05Z")

</div>

Hi, this is my first post here! I'm relatively new to Node Red and I would appreciate it if anyone could help with this issue.  
I'm trying to automate a light that is synchronised with the CO2 levels inside my house. I was able to make a range node that outputs the hue levels according to CO2 levels, for example: Red = CO2 \> 1000ppm; Yellow = 700 \< CO2 \< 1000; etc. (Note: this output is on a spectrum between 180 and 0 hue, so there are no fix values).  
How can I use this output in order to set that variable inside a home assistant "call service" node?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 April 2020 11:22 UTC](https://discourse.nodered.org/t/light-automation/22090/2 "2020-04-22T11:22:04Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
