timeFormat: 24,
menuPosition: MENU_POSITIONS.LEFT, // or BOTTOM
hideScrollbar: false, // horizontal scrollbar
groupsAlign: GROUP_ALIGNS.HORIZONTALLY, // or VERTICALLY
header: { // https://github.com/resoai/TileBoard/wiki/Header-configuration
styles: {
padding: '30px 130px 0',
fontSize: '28px'
},
right: [
{
type: HEADER_ITEMS.CUSTOM_HTML,
html: '<b>智能家庭控制中心</b>',
styles: {
margin: '20px 0 0'
}
},
{
type: HEADER_ITEMS.WEATHER,
styles: {
float: 'right',
margin: '10px',
},
icon: '&sensor.now_caiyun_weather.state',
icons: {
'晴': 'clear',
'多云': 'cloudy',
'毛毛雨': 'rain',
'小雨': 'rain',
'中雨': 'rain',
'大雨': 'rain',
'阵雨': 'rain',
'极端降雨': 'rain',
'暴雨': 'rain',
'大暴雨': 'rain',
'特大暴雨': 'rain',
'强阵雨': 'rain',
'雷阵雨': 'rain',
'强雷阵雨': 'rain',
'雨夹雪': 'sleet',
'雨雪天气': 'sleet',
'阵雨夹雪': 'sleet',
'雷阵雨伴有冰雹': 'sleet',
'小雪': 'snow',
'中雪': 'snow',
'大雪': 'snow',
'暴雪': 'snow',
'阵雪': 'snow',
'有风': 'hazy',
'微风': 'hazy',
'和风': 'hazy',
'清风': 'hazy',
'强风': 'hazy',
'疾风': 'hazy',
'清风': 'hazy',
'烈风': 'hazy',
'雾': 'fog',
'薄雾': 'fog',
'少云': 'partlycloudy',
'晴间多云': 'partlycloudy',
'阴': 'partlycloudy',
},
fields: {
summary: '&sensor.now_caiyun_weather.state',
temperature: '&sensor.now_caiyun_temperature.state',
temperatureUnit: '&sensor.now_caiyun_temperature.attributes.unit_of_measurement',
}
}
],
left: [
{
type: HEADER_ITEMS.DATETIME,
dateFormat: 'yyyy年 MM月dd日 , EEEE', //https://docs.angularjs.org/api/ng/filter/date
}
]
},