Skip to content

Commit e86a3cc

Browse files
committed
dimmableColors update
1 parent 4df09c9 commit e86a3cc

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

Changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
1.0.8
2+
- dimmableColors update
3+
14
1.0.7
25
- updated Tile layout for Toon 2 (thanks dEADkIRK)
36

HomeassistantTile.qml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Tile {
1818
Text {
1919
id: txtTimeBig
2020
text: app.timeStr
21-
color: colors.clockTileColor
21+
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
2222
anchors {
2323
left: parent.left
2424
leftMargin: 10
@@ -35,7 +35,7 @@ Tile {
3535
Text {
3636
id: txtDate
3737
text: app.dateStr
38-
color: colors.clockTileColor
38+
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
3939
anchors {
4040
left: txtTimeBig.left
4141
top: txtTimeBig.bottom
@@ -86,7 +86,7 @@ Tile {
8686
Text {
8787
id: lblSensor1
8888
text: try { JSON.parse(app.homeAssistantSensor1Info)['attributes']['friendly_name'] } catch(e) { "" }
89-
color: colors.clockTileColor
89+
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
9090
height: isNxt ? 25 : 20
9191
width: tileGrid.width - isNxt ? 50 : 40
9292
anchors {
@@ -101,7 +101,7 @@ Tile {
101101
Text {
102102
id: valueSensor1
103103
text: try { (JSON.parse(app.homeAssistantSensor1Info)['state'] + " " + JSON.parse(app.homeAssistantSensor1Info)['attributes']['unit_of_measurement']).replace("undefined", "") } catch(e) { try { JSON.parse(app.homeAssistantSensor1Info)['state'] } catch(e) { "" } }
104-
color: colors.clockTileColor
104+
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
105105
height: isNxt ? 25 : 20
106106
width: isNxt ? 50 : 40
107107
anchors {
@@ -117,7 +117,7 @@ Tile {
117117
Text {
118118
id: lblSensor2
119119
text: try { JSON.parse(app.homeAssistantSensor2Info)['attributes']['friendly_name'] } catch(e) { "" }
120-
color: colors.clockTileColor
120+
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
121121
height: isNxt ? 25 : 20
122122
width: tileGrid.width - isNxt ? 50 : 40
123123
anchors {
@@ -132,7 +132,7 @@ Tile {
132132
Text {
133133
id: valueSensor2
134134
text: try { (JSON.parse(app.homeAssistantSensor2Info)['state'] + " " + JSON.parse(app.homeAssistantSensor2Info)['attributes']['unit_of_measurement']).replace("undefined", "") } catch(e) { try { JSON.parse(app.homeAssistantSensor2Info)['state'] } catch(e) { "" } }
135-
color: colors.clockTileColor
135+
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
136136
height: isNxt ? 25 : 20
137137
width: isNxt ? 50 : 40
138138
anchors {
@@ -147,7 +147,7 @@ Tile {
147147
Text {
148148
id: lblSensor3
149149
text: try { JSON.parse(app.homeAssistantSensor3Info)['attributes']['friendly_name'] } catch(e) { "" }
150-
color: colors.clockTileColor
150+
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
151151
height: isNxt ? 25 : 20
152152
width: tileGrid.width - isNxt ? 50 : 40
153153
anchors {
@@ -162,7 +162,7 @@ Tile {
162162
Text {
163163
id: valueSensor3
164164
text: try { (JSON.parse(app.homeAssistantSensor3Info)['state'] + " " + JSON.parse(app.homeAssistantSensor3Info)['attributes']['unit_of_measurement']).replace("undefined", "") } catch(e) { try { JSON.parse(app.homeAssistantSensor3Info)['state'] } catch(e) { "" } }
165-
color: colors.clockTileColor
165+
color: (typeof dimmableColors !== 'undefined') ? dimmableColors.clockTileColor : colors.clockTileColor
166166
height: isNxt ? 25 : 20
167167
width: isNxt ? 50 : 40
168168
anchors {

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.7
1+
1.0.8

0 commit comments

Comments
 (0)