mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-06-03 15:48:10 +00:00
Updated to newer versions of Floorplan.
This commit is contained in:
parent
a7a9d170f2
commit
3cb120585d
config
configuration.yaml
www/custom_ui/floorplan
@ -80,6 +80,20 @@ http:
|
|||||||
frontend:
|
frontend:
|
||||||
javascript_version: latest
|
javascript_version: latest
|
||||||
|
|
||||||
|
# panel_iframe:
|
||||||
|
# pihole:
|
||||||
|
# title: 'Pi-Hole'
|
||||||
|
# url: 'http://pi.hole/admin'
|
||||||
|
# icon: mdi:block-helper
|
||||||
|
# unifi:
|
||||||
|
# title: 'Unifi'
|
||||||
|
# url: 'https://192.168.10.10:8443/manage'
|
||||||
|
# icon: mdi:access-point-network
|
||||||
|
# docker:
|
||||||
|
# title: 'Docker'
|
||||||
|
# url: 'https://192.168.10.10:9090/docker'
|
||||||
|
# icon: mdi:docker
|
||||||
|
|
||||||
panel_custom:
|
panel_custom:
|
||||||
- name: floorplan
|
- name: floorplan
|
||||||
sidebar_title: Alarm Panel
|
sidebar_title: Alarm Panel
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
<!--
|
<!--
|
||||||
Floorplan for Home Assistant
|
Floorplan for Home Assistant
|
||||||
Version: 1.0.7.51
|
Version: 1.0.8.3
|
||||||
By Petar Kozul
|
By Petar Kozul
|
||||||
https://github.com/pkozul/ha-floorplan
|
https://github.com/pkozul/ha-floorplan
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<script src="lib/jquery-3.2.1.min.js"></script>
|
<script src="lib/jquery-3.3.1.min.js"></script>
|
||||||
<script src="lib/moment.min.js"></script>
|
<script src="lib/moment.min.js"></script>
|
||||||
<script src="lib/yaml.min.js"></script>
|
<script src="lib/yaml.min.js"></script>
|
||||||
|
|
||||||
@ -79,7 +79,7 @@
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
class HaFloorplan extends window.hassMixins.EventsMixin(Polymer.Element) {
|
class HaFloorplan extends Polymer.Element {
|
||||||
static get is() { return 'ha-floorplan'; }
|
static get is() { return 'ha-floorplan'; }
|
||||||
|
|
||||||
static get properties() {
|
static get properties() {
|
||||||
@ -113,8 +113,10 @@
|
|||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
|
|
||||||
|
if (!this.floorplan) {
|
||||||
this.initFloorplan();
|
this.initFloorplan();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stopPropagation(e) {
|
stopPropagation(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -126,7 +128,7 @@
|
|||||||
this.floorplan = new Floorplan();
|
this.floorplan = new Floorplan();
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
doc: Polymer.dom(this.root).node,
|
doc: this.root,
|
||||||
hass: this.hass,
|
hass: this.hass,
|
||||||
openMoreInfo: this.openMoreInfo.bind(this),
|
openMoreInfo: this.openMoreInfo.bind(this),
|
||||||
setIsLoading: this.setIsLoading.bind(this),
|
setIsLoading: this.setIsLoading.bind(this),
|
||||||
@ -161,7 +163,7 @@
|
|||||||
reject(new URIError(`${err.target.src}`));
|
reject(new URIError(`${err.target.src}`));
|
||||||
};
|
};
|
||||||
|
|
||||||
Polymer.dom(this.root).node.appendChild(script);
|
this.root.appendChild(script);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,10 +182,24 @@
|
|||||||
logError(message) {
|
logError(message) {
|
||||||
console.error(message);
|
console.error(message);
|
||||||
|
|
||||||
let log = Polymer.dom(this.$.log).node;
|
let log = this.root.log;
|
||||||
$(log).find('ul').prepend(`<li class="error">${message}</li>`)
|
$(log).find('ul').prepend(`<li class="error">${message}</li>`)
|
||||||
$(log).css('display', 'block');
|
$(log).css('display', 'block');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fire(type, detail, options) {
|
||||||
|
options = options || {};
|
||||||
|
detail = (detail === null || detail === undefined) ? {} : detail;
|
||||||
|
const event = new Event(type, {
|
||||||
|
bubbles: options.bubbles === undefined ? true : options.bubbles,
|
||||||
|
cancelable: Boolean(options.cancelable),
|
||||||
|
composed: options.composed === undefined ? true : options.composed
|
||||||
|
});
|
||||||
|
event.detail = detail;
|
||||||
|
const node = options.node || this;
|
||||||
|
node.dispatchEvent(event);
|
||||||
|
return event;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
customElements.define(HaFloorplan.is, HaFloorplan);
|
customElements.define(HaFloorplan.is, HaFloorplan);
|
||||||
|
File diff suppressed because one or more lines are too long
2
config/www/custom_ui/floorplan/lib/jquery-3.3.1.min.js
vendored
Executable file
2
config/www/custom_ui/floorplan/lib/jquery-3.3.1.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user