home-automation-home-assistant/tileboard/pages/overview.js

212 rader
6.6 KiB
JavaScript
Normal vy Historik

2019-10-19 23:42:09 +00:00
var PAGE_OVERVIEW = {
title: 'Übersicht',
bg: 'images/background.png',
2019-10-19 23:42:09 +00:00
icon: 'mdi-home-outline',
groups: [
{
title: 'Licht',
width: 2,
height: 2,
items: [
{
position: [0, 0],
title: 'Theke',
subtitle: 'Küche',
id: 'light.kuchen_theke',
type: TYPES.LIGHT,
states: {
on: "An",
off: "Aus"
},
icons: {
on: "mdi-lightbulb-on",
off: "mdi-lightbulb",
},
sliders: [
{
title: 'Helligkeit',
field: 'brightness',
max: 255,
min: 0,
step: 25,
request: {
type: "call_service",
domain: "light",
service: "turn_on",
field: "brightness"
}
},
],
},
{
position: [1, 0],
title: 'Esstisch',
subtitle: 'Wohnzimmer',
id: 'light.esstisch',
type: TYPES.LIGHT,
states: {
on: "An",
off: "Aus"
},
icons: {
on: "mdi-lightbulb-on",
off: "mdi-lightbulb",
},
sliders: [
{
title: 'Helligkeit',
field: 'brightness',
max: 255,
min: 0,
step: 25,
request: {
type: "call_service",
domain: "light",
service: "turn_on",
field: "brightness"
}
},
],
},
{
position: [0, 1],
title: 'Stimmungslicht',
subtitle: 'Wohnzimmer',
id: 'light.stimmungslicht',
type: TYPES.LIGHT,
states: {
on: "An",
off: "Aus"
},
icons: {
on: "mdi-lightbulb-on",
off: "mdi-lightbulb",
},
},
{
position: [1, 1],
title: 'Ambilight',
subtitle: 'Wohnzimmer',
id: 'light.ambilight',
type: TYPES.LIGHT,
states: {
on: "An",
off: "Aus"
},
icons: {
on: "mdi-lightbulb-on",
off: "mdi-lightbulb",
},
sliders: [
{
title: 'Farbe',
field: 'color_temp',
max: 588,
min: 153,
step: 15,
request: {
type: "call_service",
domain: "light",
service: "turn_on",
field: "color_temp"
}
}
],
colorpicker: true
}
]
},
{
title: 'Wohnzimmer',
width: 2,
height: 2,
items: [
{
position: [0, 0],
type: TYPES.SENSOR,
title: 'Temperatur',
id: 'sensor.temperature_3',
unit: 'C',
state: false,
filter: function (value) { // optional
var num = parseFloat(value);
return num && !isNaN(num) ? num.toFixed(1) : value;
}
},
createGauge([1, 0], 'Luftfeuchtigkeit', 'humidity_4'),
2019-10-19 23:42:09 +00:00
{
position: [0, 1],
id: 'media_player.spotify',
type: TYPES.MEDIA_PLAYER,
width: 2,
hideSource: false,
hideMuteButton: false,
state: false,
subtitle: '@attributes.media_title',
bgSuffix: '@attributes.entity_picture',
},
]
},
{
title: 'Sonstige',
width: 1,
height: 2,
items: [
{
position: [0, 0],
height: 1,
classes: ['-compact'],
type: TYPES.WEATHER,
title: 'Wetter',
id: 'weather.openweathermap',
state: '&weather.openweathermap.state',
icon: '&weather.openweathermap.state',
icons: {
'sunny': 'sunny',
'clear-day': 'clear',
'clear-night': 'nt-clear',
'cloudy': 'cloudy',
'rainy': 'rain',
'sleet': 'sleet',
'snow': 'snow',
'wind': 'hazy',
'fog': 'fog',
'partlycloudy': 'partlycloudy',
'partly-cloudy-night': 'nt-partlycloudy'
},
fields: {
summary: '&weather.openweathermap.state',
temperature: '&weather.openweathermap.attributes.temperature',
temperatureUnit: '°C',
humidity: '&weather.openweathermap.attributes.humidity',
humidityUnit: '%',
windSpeed: '&weather.openweathermap.attributes.wind_speed',
windSpeedUnit: 'km/h',
}
},
{
position: [0, 1],
type: TYPES.ALARM,
id: "alarm_control_panel.home_alarm",
title: 'Alarm',
icons: {
disarmed: 'mdi-bell-off',
pending: 'mdi-bell',
armed_away: 'mdi-bell',
armed_night: 'mdi-bell',
triggered: 'mdi-bell-ring'
},
states: {
disarmed: 'Ausgeschaltet',
pending: 'Wartet...',
armed_away: 'Aktiviert',
armed_night: 'Nachtmodus',
triggered: 'Ausgelöst'
}
}
]
}
]
}