Skip to content

Commit

Permalink
Added a note about name/state templating
Browse files Browse the repository at this point in the history
  • Loading branch information
Clooos authored Jun 12, 2024
1 parent 37be1b9 commit 0d8da1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1399,12 +1399,14 @@ styles: |
<br>
This one is changing a button name with "It's currently sunny" depending on your weather.
This one is changing a button name/state with "It's currently sunny" depending on your weather.
```yaml
styles: |
${card.querySelector('.bubble-name').innerText = "It's currently " + hass.states['weather.home'].state}
```
If you want to template the state (`.bubble-state`) don't toggle `show_state: true` just toggle `show_attribute: true` without any attribute.
</details>
<details>
Expand Down

0 comments on commit 0d8da1c

Please sign in to comment.