Skip to content

Commit

Permalink
var
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-blackson committed Sep 20, 2024
1 parent f1876f8 commit 7586979
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 295 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ The goal of the adapter is to provide you a possibility to run countdowns for fu

### 2.3.0 (2024-09-20)
* (jack-blackson) Compatibility for js-controller 7
* (jack-blackson/bagsik) Added new object fullJSON with all objects included - thanks to bagsik who had the idea and created the code!


### 2.2.1 (2024-09-14)
* (jack-blackson) Additional check to avoid not allowed signs in countdown name
Expand Down
5 changes: 4 additions & 1 deletion docs/de/countdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@ sendTo("countdown.0", "send", {
|totalYears|Gesamtanzahl Anzahl Jahre bis zum Enddatum|

|reached|Boolean Feld, das definiert, ob das Enddatum erreicht wurde oder nicht|
|repeatEvery|Countdown wird nach Erreichen des Enddatums um diesen Zeitraum wiederholt|
|repeatEvery|Countdown wird nach Erreichen des Enddatums um diesen Zeitraum wiederholt|

|totalsJson|JSON mit Objekten für die Summe der Stunden, Tage, Wochen, Monate und Jahre|
|fullJson|JSON mit allen Objekten|
3 changes: 3 additions & 0 deletions docs/en/countdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ sendTo("countdown.0", "send", {

|reached|Boolean field defining if the end date was reached or not|
|repeatEvery|Countdown is repeted by this period after reaching the enddate|

|totalsJson|JSON with the total objects for hours, days, weeks, months and years|
|fullJson|JSON with all objects|
100 changes: 60 additions & 40 deletions lib/stateAttr.js
Original file line number Diff line number Diff line change
@@ -1,79 +1,99 @@
const stateAttrb = {
'event' : {
name: 'Event',
'name' : {
name: 'Name',
type: 'string',
role: 'value',
},
'headline' : {
name: 'Headline',
type: 'string',
'reached' : {
name: 'Reached',
type: 'boolean',
role: 'value',
},
'color' : {
name: 'Alarm color',
type: 'string',
'countUp' : {
name: 'CountUp',
type: 'boolean',
role: 'value',
},
'icon' : {
name: 'Alarm icon',
type: 'string',
'years' : {
name: 'Years',
type: 'number',
role: 'value',
},
'level' : {
name: 'Alarm level',
'months' : {
name: 'Months',
type: 'number',
role: 'value',
},
'levelText' : {
name: 'Alarm level text',
type: 'string',
'days' : {
name: 'Days',
type: 'number',
role: 'value',
},
'type' : {
name: 'Alarm type',
'hours' : {
name: 'Hours',
type: 'number',
role: 'value',
},
'typeText' : {
name: 'Alarm type text',
type: 'string',
'minutes' : {
name: 'Minutes',
type: 'number',
role: 'value',
},
'description' : {
name: 'Description',
type: 'string',
'totalDays' : {
name: 'Total no. of days',
type: 'number',
role: 'value',
},
'sender' : {
name: 'Sender of the Alarm',
type: 'string',
'totalHours' : {
name: 'Total no. of hours',
type: 'number',
role: 'value',
},
'totalWeeks' : {
name: 'Total no. of weeks',
type: 'number',
role: 'value',
},
'effective' : {
name: 'Date Alarm gets effective',
'totalMonths' : {
name: 'Total no. of months',
type: 'number',
role: 'value',
},
'totalYears' : {
name: 'Total no. of years',
type: 'number',
role: 'value',
},
'inWordsLong' : {
name: 'Result in words long',
type: 'string',
role: 'value.datetime',
role: 'value',
},
'expires' : {
name: 'Date Alarm expires',
'inWordsShort' : {
name: 'Result in words short',
type: 'string',
role: 'value.datetime',
role: 'value',
},
'link' : {
name: 'Link',
'totalJson' : {
name: 'Totals as JSON',
type: 'string',
role: 'value',
},
'updateIdentifier' : {
name: 'Identifier of update',
'fullJson' : {
name: 'All values as JSON',
type: 'string',
role: 'value',
},
'sent' : {
name: 'Last Update',
'endDate' : {
name: 'Enddate',
type: 'string',
role: 'value.datetime',
role: 'value',
},
'repeatEvery' : {
name: 'Period when the Countdown should be repeated',
type: 'string',
role: 'value',
}
};

module.exports = stateAttrb;
Loading

0 comments on commit 7586979

Please sign in to comment.