UK Versions of US Smart Apps

Hello,

I’m posting here in the hopes that someone might or already has taken up the task of modifying our American cousins Smart Apps to work with our slightly different devices over the pond. The devices that affect me are the Nest thermostat and Efergy Engage energy monitor.

The Nest device type by @Dianoga works perfectly however the app displays the modes and settings for features that our UK Nest does not have such as cooling and fan. Ours only heats and of course we work mostly in Celcius here.

The Efergy Engage device type by @tonesto7 also works great, however even though my Efergy engage account is set to £ the device outputs the sterling value but is prefixed with the $

1 Like

I maybe able to help with your nest query. When you copied @Dianoga’s code into your own new device type there’s a part in the code that look like this:

	// ============================================================
	// Slider or Buttons...
	// To expose buttons, comment out the first detials line below and uncomment the second details line below.
	// To expose sliders, uncomment the first details line below and comment out the second details line below.

	details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "presence", "heatingSetpoint", "heatSliderControl", "coolingSetpoint", "coolSliderControl", "temperatureUnit", "refresh"])
	// details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "presence", "heatingSetpointDown", "heatingSetpoint", "heatingSetpointUp", "coolingSetpointDown", "coolingSetpoint", "coolingSetpointUp", "temperatureUnit", "refresh"])

	// ============================================================



There is one line of code (below) that we are specifically interested in as this sets what tiles and in what order they appear in the app:

details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "presence", "heatingSetpoint", "heatSliderControl", "coolingSetpoint", "coolSliderControl", "temperatureUnit", "refresh"])




What you need to do, is modify this line with the stuff you want to see when you access your nest thermostat in the ST app. For example, I’ve set mine up like this:

details(["temperature", "thermostatMode", "presence", "heatingSetpoint", "heatSliderControl", "thermostatOperatingState", "humidity", "refresh", "temperatureUnit"])

If you compare mine with the original you'll notice that I've removed the cooling and fan options, and shuffled a few things around so they still appear correctly on my Android phone. If you're not on Android or prefer a different layout, you'll might want to play around with this to get it to your liking.

Nearly forgot, If you need Celsius, just hit the “temperatureUnit” tile (thermometer icon) to switch between C and F

1 Like

@slagle… Does SmartThings have a globalization / localization API for such things as currency indicators, number formats, units of measurement… And even string table support for multiple language / translations?

1 Like

Brilliant, thanks for that. I didn’t want to go in wildly stabbing at the code with little experience.

No worries!

that’s what I did… and I’ve never touched groovy or ST before til it came to the UK last month! :sweat_smile:

What I mean is, ST appears to be quite forgiving if you want to mess around with it and anyway, I knew I could always simply delete Nest from ST at anytime and fall back to the official Nest app if things started going pear shaped.

Good luck!

1 Like

I will update my code to try to determine the currency, or will create a toggle in the preferences of the SmartApp.

2 Likes

Thanks for the reply! As I said in the OP Efergy is sending the value and your device handler is showing the correct amount but with a $ instead of a £. I will try out logging for you but the EU servers are a little wonky at the moment and the apps aren’t always syncing to my mobile application properly

I understand that the numeric values are correct but I don’t think the API actually passes the actual currency units or even the locale info. So I will have to use the smartthings location info to determine whether to set $ or £

1 Like

I found a way to pull the actually currency unit from the API but it’s broken and only shows GBP no matter what currency you select

Yes, I only know of temps though

getTemperatureScale()

Will return C or F depending on how the hub is set.

2 Likes