Skip to content

Commit

Permalink
Preselect profile if not found
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Apr 5, 2024
1 parent 2bd9302 commit 079c4ae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ This adapter has vis2 widget.

![Screenshot](img/scheduler.png)

## Todo
- support holidays

<!--
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->

## Changelog
### 1.3.0 (2024-04-05)
### **WORK IN PROGRESS**
* (bluefox) Corrected widget errors
* (bluefox) Implemented custom types

Expand Down
14 changes: 1 addition & 13 deletions io-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
"name": "scheduler",
"version": "1.3.0",
"news": {
"1.3.0": {
"en": "Corrected widget errors\nImplemented custom types\n",
"de": "Korrigierte Widget-Fehler\nImplementierte benutzerdefinierte Typen\n",
"ru": "Исправленные ошибки виджета\nРеализованные пользовательские типы\n",
"pt": "Erros de widget corrigidos\nTipos personalizados implementados\n",
"nl": "Gecorrigeerde widget-fouten\nGeïmplementeerde aangepaste types\n",
"fr": "Erreurs de widget corrigées\nTypes personnalisés mis en œuvre\n",
"it": "Errori di widget corretti\nTipi personalizzati implementati\n",
"es": "Errores de widget corregidos\nTipos de encargo implementados\n",
"pl": "Skorygowane błędy widget\nWdrożone typy niestandardowe\n",
"uk": "Виправлені помилки віджету\nРеалізовані спеціальні типи\n",
"zh-cn": "修正的部件错误\n已执行定制类型\n"
},
"1.2.3": {
"en": "Corrected widget errors",
"de": "Korrigierte Widget-Fehler",
Expand Down Expand Up @@ -169,6 +156,7 @@
}
},
"native": {
"holidayId": "feiertage.0.heute.boolean",
"profiles": [
{
"id": "58f45953-9821-4746-8046-eaa5d69eaccd",
Expand Down
9 changes: 5 additions & 4 deletions src/src/components/Interval.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,6 @@ class Interval extends Component {

getPostfix(value) {
switch (this.props.type) {
case 'percent':
case 'temperature':
return value.toString() + this.props.minMax.unit;

case 'onoff':
return value
? <span style={this.props.theme.palette.text.success}>{this.props.onText}</span>
Expand All @@ -265,6 +261,11 @@ class Interval extends Component {
return value.toString() + this.props.minMax.unit;
}
return value.toString();

case 'percent':
case 'temperature':
default:
return value.toString() + this.props.minMax.unit;
}
}

Expand Down

0 comments on commit 079c4ae

Please sign in to comment.