Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerwyn committed Dec 28, 2023
2 parents 96d6079 + cd03422 commit 7d8e00d
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 5 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,46 @@ rows:
- 0
```

### Example 13

Conditional layouts using templating and an input select

```yaml
type: custom:android-tv-card
remote_id: remote.google_tv
slider_id: media_player.google_tv
rows:
- - next_thing
- |
{% if is_state("input_select.test_select", "A") %}
- touchpad
- - slider
{% elif is_state("input_select.test_select", "B") %}
- navigation_buttons
- - volume_buttons
{% elif is_state("input_select.test_select", "C") %}
- - n7
- n8
- n9
- - n4
- n5
- n6
- - n1
- n2
- n3
{% endif %}
custom_keys:
next_thing:
icon: mdi:skip-next-circle
service: input_select.select_next
data:
cycle: true
target:
entity_id: input_select.test_select
```

<img src="https://raw.githubusercontent.com/Nerwyn/android-tv-card/main/assets/conditional_layouts.png" alt="conditional layouts example" width="500"/>

[last-commit-shield]: https://img.shields.io/github/last-commit/Nerwyn/android-tv-card?style=for-the-badge
[commits]: https://github.com/Nerwyn/android-tv-card/commits/main
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge
Expand Down
Binary file added assets/conditional_layouts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dist/android-tv-card.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "android-tv-card",
"version": "3.2.3",
"version": "3.2.4",
"description": "Android TV Remote Card",
"main": "./dist/android-tv-card.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/models/maps/defaultKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const defaultKeys: Record<string, IActions> = {
},
button_mode: {
tap_action: { action: 'key', key: 'BUTTON_MODE' },
icon: 'mdi:gesture-tap-buton',
icon: 'mdi:gesture-tap-button',
},
explorer: {
tap_action: { action: 'key', key: 'EXPLORER' },
Expand Down

0 comments on commit 7d8e00d

Please sign in to comment.