# Adding measure co2 to heater

**URL:** <https://community.homey.app/t/adding-measure-co2-to-heater/55777>\
**Category:** Developers\
**Created:** [November 30, 2021, 6:06pm UTC](https://community.homey.app/t/adding-measure-co2-to-heater/55777 "2021-11-30T18:06:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deejeebv](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/deejeebv/32/34156_2.png) [@Deejeebv](https://community.homey.app/u/Deejeebv)\
**Post date:** [November 30, 2021, 6:06pm UTC](https://community.homey.app/t/adding-measure-co2-to-heater/55777/1 "2021-11-30T18:06:51Z")

</div>

I am new with developing apps for Homey. I an creating an app for my Nilan Comact P which can communicate over modbus.  
I made the first step, I can read and write values to and from the modbus, using tcp.  
The Nilan has several function, heating and cooling via brine heatpump and heating and cooling via the ventilation.  
I added a measure\_co2 to the capabilities of my heater:  
“class”: “heater”,  
“capabilities”: [  
“target\_temperature”,  
“thermostat\_mode”,  
“measure\_temperature”,  
“measure\_humidity”,  
“measure\_co2”  
]

But when I try to set his value with:  
this.setCapabilityValue(‘measure\_co2’, co2);

I got an error message: UnhandledPromiseRejectionWarning: Error: invalid\_capability

Setting humidity works with:  
this.setCapabilityValue(‘measure\_humidity’, humidity);

What is the difference?  
Is it not allowed to add the measure\_co2 to a heater?

If I want to have 2 thermostats in my app, one for air heating and cooling and one for floor heating and cooling, is that possible in one app, or do I need 2 apps?

---

<div class="post-metadata">

**Author:** ![Deejeebv](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/deejeebv/32/34156_2.png) [@Deejeebv](https://community.homey.app/u/Deejeebv)\
**Post date:** [November 30, 2021, 6:29pm UTC](https://community.homey.app/t/adding-measure-co2-to-heater/55777/2 "2021-11-30T18:29:01Z")

</div>

I have already the answer on my first problem, I had to remove my device from homey and add it again, after this I was able to set the CO2.

I still have the question if I have to define two devices to support thermostat for air heating and floor heating.

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [January 8, 2024, 9:32pm UTC](https://community.homey.app/t/adding-measure-co2-to-heater/55777/3 "2024-01-08T21:32:10Z")

</div>

@Deejeebv any updates on this matter? I’ve been struggling with the implementation as well. Maybe I can assist you. Let me know the current state you are in.

---

<div class="post-metadata">

**Author:** ![Deejeebv](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/deejeebv/32/34156_2.png) [@Deejeebv](https://community.homey.app/u/Deejeebv)\
**Post date:** [January 9, 2024, 7:43am UTC](https://community.homey.app/t/adding-measure-co2-to-heater/55777/4 "2024-01-09T07:43:52Z")

</div>

I created two apps, one for the Ventialtion and Hot water unit, one for the Geo.
