NEWS
SOLVED TileBoard Icon zeigt nur einen Zustand
-
Guten Tag,
ich bin gerade damit beschäftigt mit eine TileBoard Oberfläche anzupassen. Nun stehe ich vor dem Problem, dass ich in einem Tile nur einen Zustand via Icon sehen kann:Also:
states: {true: 'Enabled', false: 'Disabled'}
zeigt mir bei true (Enabled) und bei false (Disabled) an. Soweit zum verständnis alles OK.
Aber:
icons: {true: "mdi-power-plug", false: "mdi-power-plug-off"},
zeigt mir nur den true Zustand an.
Mache ich etwas falsch?
var CONFIG = { customTheme: CUSTOM_THEMES.TRANSPARENT, // CUSTOM_THEMES.TRANSPARENT, CUSTOM_THEMES.MATERIAL, CUSTOM_THEMES.MOBILE, CUSTOM_THEMES.COMPACT, CUSTOM_THEMES.HOMEKIT, CUSTOM_THEMES.WINPHONE, CUSTOM_THEMES.WIN95 transition: TRANSITIONS.ANIMATED_GPU, //ANIMATED or SIMPLE (better perfomance) entitySize: ENTITY_SIZES.NORMAL, //SMALL, BIG are available tileSize: 150, tileMargin: 6, authToken: null, // optional: make an long live token and put it here //googleApiKey: "XXXXXXXXXX", // Required if you are using Google Maps for device tracker debug: false, // Prints entities and state change info to the console. // next fields are optional events: [], 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: [], left: [ { type: HEADER_ITEMS.DATETIME, dateFormat: 'EEEE, LLLL dd', //https://docs.angularjs.org/api/ng/filter/date } ] }, pages: [ { title: 'Main page', bg: 'images/bg1.jpeg', icon: 'mdi-home-outline', // home icon groups: [ { title: 'Büro', width: 2, height: 3, items: [ { position: [0, 0], type: TYPES.SWITCH, id: '0_userdata.0.test', states: {true: 'Enabled', false: 'Disabled'}, icons: {true: 'mdi-power-plug', false: 'mdi-power-plug-off'}, } ] }, ] } ], };
-
Hallo,
versuche mal die beiden false Angaben bei states und icons durch null zu ersetzen. -
Hallo,
versuche mal die beiden false Angaben bei states und icons durch null zu ersetzen. -
@MrPepper Super hat funktioniert. Kannst du mir erklären wieso?