Dear all,
currently I am creating my own integration.
I created my own sensor and my own custom card.
The custom card is located in the www folder and added as resource.
So far, its working on the Notebook browser (see image below), but not on the iPhone HA app
I only use the extra attribues ${state.attributes.test} in my custom card to display the content, not the state
set hass(hass) {
// Initialize the content if it's not there yet.
if (!this.content) {
const card = document.createElement('ha-card');
card.header = "Another MVG Card";
this.content = document.createElement('div');
const style = document.createElement('style');
style.textContent = `
table {
background-color: #000080;
color: #fff;
width: 100%;
}
// removed to cut the code
`
card.appendChild(style);
card.appendChild(this.content);
this.appendChild(card);
}
const entityId = this.config.entity;
const state = hass.states[entityId];
const stateStr = state ? state.state : "unavailable";
this.content.innerHTML = `<!-- The state of ${entityId} is ${stateStr} -->
${state.attributes.test}
<!-- ANOTHER-MVG -->
`;
}
On the mobile device, its showing the state instead of ${state.attributes.test}
I already restarted HA again
I closed (forced close) HA app on my iPhone and started it again
is there a special mobile option, I have to configure ?
How can I solve the problem ?