Compare commits
No commits in common. "0932bad462bb1c91da959f61bc2b73951e094caf" and "4a9a32ef3ef64aa67998f8bf334cf2bca0750041" have entirely different histories.
0932bad462
...
4a9a32ef3e
@ -7,12 +7,11 @@
|
|||||||
#MMM-HomeAssistant-Touch .ha-entity {
|
#MMM-HomeAssistant-Touch .ha-entity {
|
||||||
border: 0.1rem solid grey;
|
border: 0.1rem solid grey;
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
|
padding: 0.5rem;
|
||||||
margin: 0.5rem;
|
margin: 0.5rem;
|
||||||
width: max-content;
|
height: 7rem;
|
||||||
height: 1rem;
|
width: 7rem;
|
||||||
padding: 1rem 0rem 0rem 0rem;
|
font-size: 18px;
|
||||||
font-size: 25px;
|
|
||||||
line-height: 0em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#MMM-HomeAssistant-Touch .ha-entity .title,
|
#MMM-HomeAssistant-Touch .ha-entity .title,
|
||||||
|
|||||||
@ -102,10 +102,10 @@ function loadEntityClasses() {
|
|||||||
this.entities = {};
|
this.entities = {};
|
||||||
|
|
||||||
// load UI Classes
|
// load UI Classes
|
||||||
for (const entity in this.config.entities_name) {
|
for (const entity of this.config.entities) {
|
||||||
const entityClass = this.UIClassFactory.getEntityClass(entity);
|
const entityClass = this.UIClassFactory.getEntityClass(entity);
|
||||||
if (entityClass) {
|
if (entityClass) {
|
||||||
this.entities[entity] = new entityClass(entity, this, this.config.entities_name[entity]);
|
this.entities[entity] = new entityClass(entity, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,13 @@
|
|||||||
class Base {
|
class Base {
|
||||||
constructor(id, mm, name = "") {
|
constructor(id, mm) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.type = id.split(".")[0];
|
this.type = id.split(".")[0];
|
||||||
if (name == "")
|
|
||||||
this.name = id;
|
this.name = id;
|
||||||
else
|
|
||||||
this.name = name;
|
|
||||||
this.mm = mm;
|
this.mm = mm;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateState(state) {
|
updateState(state) {
|
||||||
//this.name = (state.attributes || {}).friendly_name || this.id;
|
this.name = (state.attributes || {}).friendly_name || this.id;
|
||||||
this.state = state.state;
|
this.state = state.state;
|
||||||
this.render();
|
this.render();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user