Help/guidance writing a string

I’m not a coder and struggling to work this out so was wondering is there anyone who could help me with some guidance with trying to figure out how to write a string format to display the current thermostat setpoint in use, based on the thermostat selection of Heat, Cool, Energy Saving, Off.

The thermostat displays in my Fibaro HC2 as four separate devices i.e.

Heat (HomeRemote Binding - ConservatoryConservatoryHeatTe.HeatingSetpoint)

Cool (HomeRemote Binding - ConservatoryConservatoryCoolTe.CoolingSetpoint)

Energy Saving (HomeRemote this does not show in HomeRemote and I believe is unsupported so I guess I’m best using the output from Binding - ConservatoryConservatoryThermos.ThermostatMode) This will report Unknown

Idle (this is displayed in HomeRemote using the binding ConservatoryConservatoryThermos.ThermostatMode)

image

The way it works in HC2 is I have to predefine/save the pre-set temperature requirements for each of the device category’s (Heat, Cool, Energy Saving). I then have to select the mode type I require to switch the heating (i.e. Heat, Cool, Energy Saving, Off).

When I select the mode type in HC2, HomeRemote reports the mode type using this binding name - ConservatoryConservatoryThermos.ThermostatMode i.e. -

Heat

Cool

Unknown

Off

image

I’m struggling to work out how to convert the output from the text i.e. if it reports -

Heat then display binding output temperature of ConservatoryConservatoryHeatTe.HeatingSetpoint

Cool then display binding output temperature of ConservatoryConservatoryCoolTe.CoolingSetpoint

Unknown then display binding output of ConservatoryConservatoryThermos.ThermostatMode (which will output Unknown as this mode is not supported in HomeRemote)

Off then display binding output of ConservatoryConservatoryThermos.ThermostatMode (which will output Off)

image

Many thanks

Steve

Sounds like you are wanting to do something that is very similar to the status label in the newest ThermostatTile.xaml template. Create a new project & look at that file. Using DataTriggers/MultiDataTriggers it applies a different StringFormat depending on the current mode.

Thank you for your reply. As instructed I have looked at that template but I’m way over my head with this. Can you recommend where I can read up on this so I can understand what I need to do please?

The only thing you really need to understand is how DataTriggers work. They allow for you to change property values based on device state. Brian gives an excellent rundown of how they work in his video here->

Thanks again, I will watch the video if I get stuck I will get back to you…

Kindest regards

Steve