# Module: Compliments The `compliments` module is one of the default modules of the MagicMirror. This module displays a random compliment. ## Using the module To use this module, add it to the modules array in the `config/config.js` file: ````javascript modules: [ { module: 'compliments', position: 'lower_third', // This can be any of the regions. // Best results in one of the middle regions like: lower_third config: { // The config property is optional. // If no config is set, an example calendar is shown. // See 'Configuration options' for more information. } } ] ```` ## Configuration options The following properties can be configured:
Option | Description |
---|---|
updateInterval |
How often does the compliment have to change? (Milliseconds) Possible values: 1000 - 86400000
Default value: 30000 (30 seconds)
|
fadeSpeed |
Speed of the update animation. (Milliseconds) Possible values: 0 - 5000
Default value: 4000 (4 seconds)
|
compliments |
The list of compliments. Possible values: An object with three arrays: morning , afternoon andevening . See compliment configuration below.
Default value: See compliment configuration below. |
morning
, afternoon
andevening
. Based on the time of the day, the compliments will be picked out of one of these arrays. The arrays contain one or multiple compliments.
If use the currentweather is possible use a actual weather for set compliments. The availables properties are:
* day_sunny
* day_cloudy
* cloudy
* cloudy_windy
* showers
* rain
* thunderstorm
* snow
* fog
* night_clear
* night_cloudy
* night_showers
* night_rain
* night_thunderstorm
* night_snow
* night_alt_cloudy_windy
#### Example use with currentweather module
````javascript
config: {
compliments: {
day_sunny: [
'Today is a sunny day',
'It\'s a beautiful day'
],
snow: [
'Snowball battle!'
],
rain: [
'Don\'t forget your umbrella'
]
}
}
````
#### Default value:
````javascript
config: {
compliments: {
morning: [
'Good morning, handsome!',
'Enjoy your day!',
'How was your sleep?'
],
afternoon: [
'Hello, beauty!',
'You look sexy!',
'Looking good today!'
],
evening: [
'Wow, you look hot!',
'You look nice!',
'Hi, sexy!'
]
}
}
````