# Homey Apps SDK v3 I18n.getUnit() function problem

**URL:** <https://community.homey.app/t/homey-apps-sdk-v3-i18n-getunit-function-problem/114111>\
**Category:** Developers\
**Tags:** flow, homey-pro\
**Created:** [August 8, 2024, 11:56pm UTC](https://community.homey.app/t/homey-apps-sdk-v3-i18n-getunit-function-problem/114111 "2024-08-08T23:56:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinbaek\_lee](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jinbaek_lee/32/112069_2.png) [@jinbaek\_lee](https://community.homey.app/u/jinbaek_lee)\
**Post date:** [August 8, 2024, 11:56pm UTC](https://community.homey.app/t/homey-apps-sdk-v3-i18n-getunit-function-problem/114111/1 "2024-08-08T23:56:00Z")

</div>

Hi, everyone.  
I am developing an app that runs on Homey Pro.  
I want to perform different actions based on whether the temperature unit in Homey Pro is Celsius or Fahrenheit.  
I think I can use the getUnit() function for this, but I am not sure if it works correctly.

I have changed the location settings in Homey Pro to the United States to make the Homey app operate in Fahrenheit, but the return value of getUnit() is always ‘metric’.

> **[ManagerI18n - Homey Apps SDK v3](https://apps-sdk-v3.developer.homey.app/ManagerI18n.html#getUnits)**

Could you possibly know what the issue might be?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 9, 2024, 12:45am UTC](https://community.homey.app/t/homey-apps-sdk-v3-i18n-getunit-function-problem/114111/2 "2024-08-09T00:45:43Z")

</div>

### Temperature conversion

Your Homey app should always use Celsius internally, Homey will automatically converts capability values from Celsius to Fahrenheit. For custom capabilities make sure the “unit” is set to “°C” to let Homey know that this value should be converted.

> **[Internationalization | Homey Apps SDK](https://apps.developer.homey.app/the-basics/app/internationalization)**
>
> Homey Apps support internationalization so that users can use your app in their native language.

---

<div class="post-metadata">

**Author:** ![jinbaek\_lee](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jinbaek_lee/32/112069_2.png) [@jinbaek\_lee](https://community.homey.app/u/jinbaek_lee)\
**Post date:** [August 9, 2024, 1:14am UTC](https://community.homey.app/t/homey-apps-sdk-v3-i18n-getunit-function-problem/114111/3 "2024-08-09T01:14:54Z")

</div>

Think you for your answer, but I don’t quite understand that part.  
The API I am trying to use provides both metric and imperial values in its response.  
Does this mean that if I use the metric value in my app, Homey Pro will automatically convert it to Fahrenheit?

In which cases does the getUnit() API return the imperial value?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 9, 2024, 11:40am UTC](https://community.homey.app/t/homey-apps-sdk-v3-i18n-getunit-function-problem/114111/4 "2024-08-09T11:40:36Z")

</div>

Well, it was quoted from the “manual”.

> [@jinbaek\_lee](#):
>
> Does this mean that if I use the metric value in my app, Homey Pro will automatically convert it to Fahrenheit?

… to Fahrenheit depending on the geolocation.  
Yes, that’s what I understand from the explanation.
