summaryrefslogtreecommitdiffstats
path: root/app/api/Binding.qml
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2017-12-29 23:08:42 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-01-04 17:32:20 +0000
commitdd747fa9dfc009da9113e310d9b40f6280e7a57a (patch)
tree45a1f583a115ec44fbe6262b9d639f6af3353980 /app/api/Binding.qml
parent705509400742a757f2abe9399711197a37a07e74 (diff)
Change-Id: I12130b4a1c5c6dad9658972d32b4b9e362a8d1cc Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Diffstat (limited to 'app/api/Binding.qml')
-rw-r--r--app/api/Binding.qml8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/api/Binding.qml b/app/api/Binding.qml
index 673cfdd..25388df 100644
--- a/app/api/Binding.qml
+++ b/app/api/Binding.qml
@@ -27,6 +27,7 @@ WebSocket {
property real fanSpeed: 0.0
property real leftTemperature: 21.0
property real rightTemperature: 21.0
+ property string language: "en_US"
property Connections c : Connections {
target: root
@@ -45,6 +46,11 @@ WebSocket {
console.debug(JSON.stringify(json))
sendTextMessage(JSON.stringify(json))
}
+ onLanguageChanged: {
+ var json = [MessageId.call, '9999', 'hvac/set', {'Language': language}]
+ console.debug(JSON.stringify(json))
+ sendTextMessage(JSON.stringify(json))
+ }
}
onTextMessageReceived: {
@@ -64,7 +70,7 @@ WebSocket {
case MessageId.event:
if (json[1] == "hvac/language")
console.log("HVAC event received: ",json[2])
- ApplicationWindow.root.translator.language = json[2].data
+ root.language = json[2].data
root.statusString = "Language changed to "+language
break
}