Fix popup card in safari. Add IP to FKB sensor. Tweak keepalive function
This commit is contained in:
parent
f9701052ba
commit
2528494809
File diff suppressed because one or more lines are too long
@ -42,10 +42,12 @@ export const FullyKioskMixin = (C) => class extends C {
|
|||||||
battery: window.fully.getBatteryLevel(),
|
battery: window.fully.getBatteryLevel(),
|
||||||
charging: window.fully.isPlugged(),
|
charging: window.fully.isPlugged(),
|
||||||
motion: this._fullyMotion,
|
motion: this._fullyMotion,
|
||||||
|
ip: window.fully.getIp4Address(),
|
||||||
}})
|
}})
|
||||||
}
|
}
|
||||||
|
|
||||||
fullyMotionTriggered() {
|
fullyMotionTriggered() {
|
||||||
|
if(this._keepingAlive) return;
|
||||||
this._fullyMotion = true;
|
this._fullyMotion = true;
|
||||||
clearTimeout(this._motionTimeout);
|
clearTimeout(this._motionTimeout);
|
||||||
this._motionTimeout = setTimeout(() => {
|
this._motionTimeout = setTimeout(() => {
|
||||||
|
16
js/popups.js
16
js/popups.js
@ -25,15 +25,15 @@ export const BrowserModPopupsMixin = (C) => class extends C {
|
|||||||
const d = data[ev.detail.entityId];
|
const d = data[ev.detail.entityId];
|
||||||
if(!d) return;
|
if(!d) return;
|
||||||
|
|
||||||
window.queueMicrotask(() => {
|
popUp(
|
||||||
|
d.title,
|
||||||
|
d.card,
|
||||||
|
d.large || false,
|
||||||
|
d.style
|
||||||
|
);
|
||||||
|
window.setTimeout(() => {
|
||||||
fireEvent("hass-more-info", {entityID: "."}, document.querySelector("home-assistant"));
|
fireEvent("hass-more-info", {entityID: "."}, document.querySelector("home-assistant"));
|
||||||
popUp(
|
}, 50);
|
||||||
d.title,
|
|
||||||
d.card,
|
|
||||||
d.large || false,
|
|
||||||
d.style
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_popup(cfg) {
|
do_popup(cfg) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "browser_mod",
|
"name": "browser_mod",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"build": "webpack",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
name: browser_mod
|
name: browser_mod
|
||||||
popup_cards:
|
popup_cards:
|
||||||
sun.sun:
|
sun.sun:
|
||||||
title: Popup-card
|
title: Global Popup-card
|
||||||
card:
|
card:
|
||||||
type: markdown
|
type: markdown
|
||||||
content: Popup for sun.sun
|
content: Gobal popup for sun.sun
|
||||||
views:
|
views:
|
||||||
- title: Player
|
- title: Player
|
||||||
cards:
|
cards:
|
||||||
@ -24,5 +24,35 @@ views:
|
|||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
- type: button
|
||||||
|
entity: sun.sun
|
||||||
|
name: Global popup-card
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
|
|
||||||
- !include views/popup.yaml
|
- !include views/popup.yaml
|
||||||
|
|
||||||
|
- title: Popup card
|
||||||
|
popup_cards:
|
||||||
|
sun.sun:
|
||||||
|
title: Local Popup-card
|
||||||
|
card:
|
||||||
|
type: markdown
|
||||||
|
content: Local popup for sun.sun
|
||||||
|
climate.hvac:
|
||||||
|
title: Local Popup-card
|
||||||
|
card:
|
||||||
|
type: markdown
|
||||||
|
content: Local popup for climate.hvac
|
||||||
|
|
||||||
|
cards:
|
||||||
|
- type: button
|
||||||
|
entity: climate.hvac
|
||||||
|
name: Local popup-card
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
|
- type: button
|
||||||
|
entity: sun.sun
|
||||||
|
name: Override global popup-card
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user