@Amaurgit - Thank you for the reply - still failing miserably tried both these options
the first , popup don’t open & console error -
angular.js:15697 TypeError: Cannot read property ‘openPopup’ of undefined
at config.js?r=1628365522785:1533
{
position: [0, 0],
width: 2,
height: 1,
title: 'System',
id: {},
type: TYPES.TEXT_LIST,
state: false,
list: [
{
title: 'Processor',
icon: 'mdi-cpu-64-bit',
value: '&sensor.processor_use_percent.state' + '%'
},
],
action: function (item, entity) {
this.$scope.openPopup(item, entity);
setTimeout(function () {
this.$scope.closePopup();
}, '2000');}.bind(this),
popup: {
tileSize: 100,
items: [
{
position: [0, 0],
width: 2,
type: TYPES.HISTORY,
id: "sensor.processor_use_percent",
title: "CPU %",
customStyles: {'background-color':'#667584'},
subtitle: function (item, entity) {
return (
"since " +
timeAgo(Date.now() - (item.offset || 24 * 3600 * 1000))
);
},
offset: 0.01 * 24 * 3600 * 1000,
options: MINIMAL_CHART_OPTIONS,
},
],
}
},
The second popup opens , the tile is a Boolean it doesn’t turn on - & popup don’t close -error in the console -
angular.js:15697 TypeError: Cannot read property ‘entityClick’ of undefined
at config.js?r=1628366467625:1608
at R (main.js:2212)
at c.t.entityClick (main.js:119)
at fn (eval at compile (angular.js:16548), :4:360)
at i (angular.js:29123)
at c.$eval (angular.js:19523)
at c.$apply (angular.js:19622)
at HTMLDivElement. (angular.js:29127)
at Pe (angular.js:3891)
at HTMLDivElement.n (angular.js:3879)
{
position: [0, 1],
type: TYPES.POPUP,
id: {},
icon: "mdi-home-group",
title: "Home Scenes",
customStyles: {
"background-color": "#7dba81",},
height: 1,
state: false,
popup: {
tileSize: 100,
items: [
{
position: [0, 0],
width: 2,
title: "Guest Mode",
classes: [CLASS_BIG],
type: TYPES.INPUT_BOOLEAN,
id: "input_boolean.guest_mode",
icons: {
on: "mdi-account-multiple-plus",
off: "mdi-account-multiple-outline",
},
customStyles: function (item, entity) {
if (entity.state === "off") {
return { backgroundColor: "#898c80" };
} else {
return { backgroundColor: "red" };
}
},
states: {
on: "Guests",
off: "No Guests",
},
action: function (item, entity) {
this.$scope.entityClick({}, item, entity);
setTimeout(function () {
this.$scope.closePopup();
}, '3000');}.bind(this)
},
],
},
},
any assistance will be appreciated - is there anything oblivious that I’m missing here - still learning
Thanks again .