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
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
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 {
0 commit comments