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