-
Notifications
You must be signed in to change notification settings - Fork 70
/
floorplan.html
64 lines (53 loc) · 1.33 KB
/
floorplan.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<link rel="import" href="/local/custom_ui/floorplan/ha-floorplan.html" async>
<dom-module id="ha-panel-floorplan">
<template>
<style include="ha-style">
.container {
height: calc(100% - 64px);
vertical-align: top;
position: relative;
}
[hidden] {
display: none !important;
}
</style>
<app-toolbar hidden$='{{!showAppToolbar}}'>
<ha-menu-button narrow='[[narrow]]' show-menu='[[showMenu]]'></ha-menu-button>
<div main-title>[[panel.title]]</div>
</app-toolbar>
<div class="container">
<ha-floorplan hass=[[hass]] config=[[panel.config]] is-panel></ha-floorplan>
</div>
</template>
</dom-module>
<script>
Polymer({
is: 'ha-panel-floorplan',
properties: {
hass: {
type: Object,
},
narrow: {
type: Boolean,
value: false,
},
showMenu: {
type: Boolean,
value: true,
},
showAppToolbar: {
type: Boolean,
value: false,
},
panel: {
type: Object,
observer: 'panelChanged',
}
},
panelChanged: function() {
var hideAppToolbar = ((this.panel.config.hide_app_toolbar === null) ||
(this.panel.config.hide_app_toolbar !== undefined));
this.showAppToolbar = !hideAppToolbar;
},
});
</script>