Skip to content

Commit 550006b

Browse files
committedJul 8, 2024
fix depcrecation warning in openhab 4.2
1 parent 9311420 commit 550006b

File tree

3 files changed

+74
-123
lines changed

3 files changed

+74
-123
lines changed
 

‎conf/html/shared/habpanel/css/theme.css

+70-119
Original file line numberDiff line numberDiff line change
@@ -1012,31 +1012,89 @@ body,
10121012
.mvWidget .weatherForecast .sun .night {
10131013
stroke-width: 1.4px;
10141014
}
1015+
1016+
.mvWidget .weatherForecast .details {
1017+
display: flex;
1018+
justify-content: space-between;
1019+
}
1020+
1021+
.mvWidget .weatherForecast .details .value.temperature {
1022+
display: flex;
1023+
}
1024+
1025+
.mvWidget .weatherForecast .details .value.bottom {
1026+
display: flex;
1027+
position: relative;
1028+
}
1029+
.mvWidget .weatherForecast .details .value.bottom .sun {
1030+
overflow: hidden;
1031+
width: 4vw;
1032+
height: 4vw;
1033+
margin-left: -5px;
1034+
}
1035+
.mvWidget .weatherForecast .details .value.bottom .precipitationProbability svg {
1036+
width: 0.8vw;
1037+
height: 0.8vw;
1038+
margin-top: 0.1vw;
1039+
margin-right: 2px;
1040+
stroke: var(--sub-icon-color);
1041+
fill: none;
1042+
}
1043+
.mvWidget .weatherForecast .details .value.bottom .precipitationProbability {
1044+
position: absolute;
1045+
right: 0;
1046+
bottom: 25px;
1047+
}
1048+
.mvWidget .weatherForecast .details .value.bottom .precipitationAmount {
1049+
position: absolute;
1050+
right: 0;
1051+
bottom: 5px;
1052+
}
1053+
.mvWidget .weatherForecast .details .value.bottom .value {
1054+
display: flex;
1055+
font-size: 0.9vw;
1056+
}
1057+
.mvWidget .weatherForecast .details .cell.title {
1058+
font-size: 1.0vw;
1059+
padding-bottom: 5px;
1060+
}
1061+
1062+
.mvWidget .weatherForecast .details .cell .temperature .sub {
1063+
font-size: 1.4vw;
1064+
line-height: 1.4vw;
1065+
}
1066+
.mvWidget .weatherForecast .details .cell .temperature .main {
1067+
font-size: 1.6vw;
1068+
font-weight: var(--widget-value-weight);
1069+
color: var(--widget-value-color-main);
1070+
}
1071+
1072+
.mvWidget .weatherForecast .summary {
1073+
margin-top: 10px;
1074+
}
1075+
10151076
.mvWidget .weatherForecast .summary,
10161077
.mvWidget .weatherForecast .summary .cell {
10171078
display: flex;
1079+
font-size: 1vw;
1080+
font-weight: var(--widget-value-weight);
1081+
color: var(--widget-text-color-nonimportant);
10181082
}
1083+
10191084
.mvWidget .weatherForecast .summary .bullet {
10201085
font-size: 1vw;
10211086
color: var(--widget-text-color-nonimportant);
10221087
flex-grow: 1;
10231088
}
10241089
.mvWidget .weatherForecast .summary .cell {
1025-
justify-content: flex-end;
1026-
}
1027-
.mvWidget .weatherForecast .summary .cell:first-child {
1028-
justify-content: flex-start;
1029-
}
1030-
.mvWidget .weatherForecast .summary .txt {
1031-
font-size: 1vw;
1032-
padding-top: 2px;
1033-
color: var(--widget-text-color-nonimportant);
1090+
justify-content: space-between;
10341091
}
1092+
10351093
.mvWidget .weatherForecast .summary .icon {
10361094
margin-left: 0.3vw;
10371095
margin-right: 0.3vw;
1038-
width: 16px;
1039-
height: 16px;
1096+
width: 0.7vw;
1097+
height: 0.7vw;
10401098
flex-grow: 0;
10411099
}
10421100
.mvWidget .weatherForecast .summary .icon svg {
@@ -1051,113 +1109,6 @@ body,
10511109
filter: brightness(150%);
10521110
}
10531111
.mvWidget .weatherForecast .summary .icon.sun svg {
1054-
/*margin: 0px;*/
10551112
filter: brightness(70%);
10561113
}
1057-
.mvWidget .weatherForecast .summary .value {
1058-
font-weight: var(--widget-value-weight);
1059-
white-space: nowrap;
1060-
}
1061-
.mvWidget .weatherForecast .summary .cell,
1062-
.mvWidget .weatherForecast .summary .bullet {
1063-
margin-top: 1.1vw;
1064-
font-size: 1.2vw;
1065-
width: auto;
1066-
}
1067-
.mvWidget .weatherForecast .summary .bullet {
1068-
padding-left: 0.8vw;
1069-
padding-right: 0.8vw;
1070-
}
1071-
.mvWidget .weatherTodayForecast .headlines,
1072-
.mvWidget .weatherTodayForecast .summary .cell,
1073-
.mvWidget .weatherTodayForecast .summary .bullet {
1074-
border-top: 1px dashed var(--primary-light-color);
1075-
}
1076-
.mvWidget .weatherTodayForecast .headlines .cell,
1077-
.mvWidget .weatherTodayForecast .summary .cell,
1078-
.mvWidget .weatherTodayForecast .summary .bullet {
1079-
padding-top: 1.1vw;
1080-
}
1081-
.mvWidget .weatherTodayForecast .headlines .cell,
1082-
.mvWidget .weatherTodayForecast .details .cell {
1083-
width: 25%;
1084-
margin-right: 5%;
1085-
}
1086-
.mvWidget .weatherTodayForecast .headlines .cell:last-child,
1087-
.mvWidget .weatherTodayForecast .details .cell:last-child {
1088-
margin-right: 0%;
1089-
}
1090-
.mvWidget .weatherTodayForecast .headlines,
1091-
.mvWidget .weatherTodayForecast .details {
1092-
display: flex;
1093-
}
1094-
.mvWidget .weatherTodayForecast .details .cell {
1095-
position: relative;
1096-
height: 7vw;
1097-
}
1098-
.mvWidget .weatherTodayForecast .details .cell .sun,
1099-
.mvWidget .weatherTodayForecast .details .cell .time,
1100-
.mvWidget .weatherTodayForecast .details .cell .temperature,
1101-
.mvWidget .weatherTodayForecast .details .cell .precipitationProbability,
1102-
.mvWidget .weatherTodayForecast .details .cell .precipitationAmount {
1103-
position: absolute;
1104-
}
1105-
.mvWidget .weatherTodayForecast .details .cell .temperature,
1106-
.mvWidget .weatherTodayForecast .details .cell .precipitationProbability,
1107-
.mvWidget .weatherTodayForecast .details .cell .precipitationAmount {
1108-
display: flex;
1109-
justify-content: flex-end;
1110-
}
1111-
.mvWidget .weatherTodayForecast .details .cell .sun {
1112-
overflow: hidden;
1113-
left: 0;
1114-
bottom: 0px;
1115-
width: 4vw;
1116-
height: 4vw;
1117-
margin-left: -3px;
1118-
}
1119-
.mvWidget .weatherTodayForecast .details .cell .time {
1120-
left: 0px;
1121-
top: 4px;
1122-
width: auto;
1123-
color: var(--widget-text-color-nonimportant);
1124-
}
1125-
.mvWidget .weatherTodayForecast .details .cell .time .from {
1126-
font-size: 1.2vw;
1127-
line-height: 1.2vw;
1128-
}
1129-
.mvWidget .weatherTodayForecast .details .cell .time .to {
1130-
font-size: 1.0vw;
1131-
line-height: 1.0vw;
1132-
text-align: left;
1133-
}
1134-
.mvWidget .weatherTodayForecast .details .cell .temperature {
1135-
right: 0;
1136-
top: 4px;
1137-
}
1138-
.mvWidget .weatherTodayForecast .details .cell .temperature .sub {
1139-
font-size: 1.4vw;
1140-
line-height: 1.4vw;
1141-
}
1142-
.mvWidget .weatherTodayForecast .details .cell .temperature .main {
1143-
font-size: 2vw;
1144-
font-weight: var(--widget-value-weight);
1145-
color: var(--widget-value-color-main);
1146-
}
1147-
.mvWidget .weatherTodayForecast .details .cell .precipitationProbability {
1148-
right: 0px;
1149-
bottom: 20px;
1150-
}
1151-
.mvWidget .weatherTodayForecast .details .value.precipitationProbability svg {
1152-
width: 16px;
1153-
height: 16px;
1154-
line-height: 16px;
1155-
margin-right: 2px;
1156-
margin-top: -2px;
1157-
stroke: var(--sub-icon-color);
1158-
fill: none;
1159-
}
1160-
.mvWidget .weatherTodayForecast .details .cell .precipitationAmount {
1161-
right: 0px;
1162-
bottom: 0px;
1163-
}
1114+

‎conf/html/shared/habpanel/js/helper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ var mvInitializer = function(){
234234
var mvClass = scope.$eval(attrs.mvClass,myVars);
235235

236236
//console.log(mvClass);
237-
if( Array.isArray(mvClass) ) mvClass = mvClass[1];
237+
if( Array.isArray(mvClass) ) mvClass = mvClass[mvClass.length-1];
238238

239239
var className = element[0].getAttribute("class");
240240
var classList = className == null ? [] : className.split(" ");

‎python/shared/helper.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,17 @@ def handler(self):
235235
def start(self):
236236
if not self.timer.isAlive():
237237
#log.info("timer started")
238-
self.timer.start()
239238
activeTimer.append(self)
239+
self.timer.start()
240240
else:
241241
#log.info("timer already started")
242242
pass
243243

244244
def cancel(self):
245245
if self.timer.isAlive():
246246
#log.info("timer stopped")
247-
self.timer.cancel()
248247
activeTimer.remove(self)
248+
self.timer.cancel()
249249
else:
250250
#log.info("timer not alive")
251251
pass
@@ -355,7 +355,7 @@ def getPreviousItemState(itemOrName):
355355

356356
def getHistoricItemEntry(itemOrName, refDate):
357357
item = _getItem(itemOrName)
358-
historicEntry = PersistenceExtensions.historicState(item, refDate, "jdbc")
358+
historicEntry = PersistenceExtensions.persistedState(item, refDate, "jdbc")
359359
if historicEntry is None:
360360
raise NotInitialisedException(u"Item history for {} before {} not found".format(item.getName(),refDate))
361361
return historicEntry

0 commit comments

Comments
 (0)
Please sign in to comment.