Merge pull request #10 from bphermansson/Update-README

Update readme
This commit is contained in:
Brian Towles
2023-05-15 08:18:34 -05:00
committed by GitHub
2 changed files with 23 additions and 1 deletions

View File

@@ -54,7 +54,7 @@ Templates allow you to output virtually any HTML you want to in the contents of
|---|---| |---|---|
| triggerEntities | The array of entities to watch for state changes to determine if this sections displayTemplate should be re-rendered. | | triggerEntities | The array of entities to watch for state changes to determine if this sections displayTemplate should be re-rendered. |
| displayTemplate | The template to send to Home Assistant to render. The results of the render will be displayed as the contents of this section in the module. | | displayTemplate | The template to send to Home Assistant to render. The results of the render will be displayed as the contents of this section in the module. |
| class | The CSS class name to add to the `<div>` surrounding this section of the module. | | class | The CSS class name to add to the `<div>` surrounding this section of the module. This is a name you choose yourself, for example "HAValues". You can then style this section by adding a .HAvalues-section in custom.css. |
#### Note #### Note
@@ -140,6 +140,28 @@ This example pulls the info from a media player entity in Home Assistant. It on
}, },
``` ```
#### Simple example
![Media](images/simpleExample.png)
```javascript
{
module: 'MMM-HomeAssistantDisplay',
position: 'top_right',
config: {
host: "192.168.1.10",
token: "..."
port: 8123,
useTLS: false,
class: "HAvalues",
sections: [{
displayTemplate: `
<i class='mdi mdi-email'></i> Post: {{states('sensor.postleverans')}}<br>
}]
}
}
```
#### Always Displayed with Complex Template #### Always Displayed with Complex Template

BIN
images/simpleExample.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB