Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 121 additions & 109 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Supports [ollo69's SamsungTV Smart Component](https://github.com/ollo69/ha-samsungtv-smart)
- Supports [LG webOS Smart TV](https://www.home-assistant.io/integrations/webostv/)
- Supports [Android TV](https://www.home-assistant.io/integrations/androidtv/)
- Supports [Sony Bravia TV](https://www.home-assistant.io/integrations/braviatv)
- Much easier setup
- Implements haptics feedback
- Customizable layout, you can choose the order of the rows and buttons
Expand All @@ -31,12 +32,13 @@
| ---- | ---- | ------- | ---- | -----------
| type | string | **Required** | | `custom:tv-card`
| entity | string | **Required** | | The `media_player` entity to control.
| platform | string | **Optional** | `samsungtv` | Platform of `media_player`. Supported values: `samsungtv`, `androidtv`, `webostv`, `roku`
| remote_entity | string | **Optional** | `remote.{{entity_id}}` | The remote entity that controls the Roku `media_player`
| platform | string | **Optional** | `samsungtv` | Platform of `media_player`. Supported values: `samsungtv`, `androidtv`, `webostv`, `roku`, `braviatv`
| remote_entity | string | **Optional** | `remote.{{entity_id}}` | The remote entity that controls the Roku and Bravia `media_player`
| volume_entity | string | **Optional** | `entity` | The `media_player` entity for volume control (working only with volume_row: `slider`)
| title | string | **Optional** | | Card title for showing as header.
| enable_double_click | boolean | **Optional** | `true` | Whether a double click on the touchpad should send the key in `double_click_keycode`
| double_click_keycode | string | **Optional** | `KEY_RETURN` | The key for double clicks on the touchpad. Defaults to `KEY_RETURN`
| rows | object | **Optional** | | Button rows
| enable_double_click | boolean | **Optional** | `true` | Whether a double click on the touchpad should send the key in `double_click_action`
| double_click_action | string | **Optional** | `return` | The action for double clicks on the touchpad. Defaults to `return`
| enable_button_feedback | boolean | **Optional** | `true` | Shall clicks on the buttons return a vibration feedback?
| enable_slider_feedback | boolean | **Optional** | `true` | Shall the volume slider return a vibration feedback when you slide through it?
| slider_config | object | **Optional** | | Custom configuration for the volume slider. See [slider-card](https://github.com/AnthonMS/my-cards)
Expand All @@ -48,26 +50,30 @@ In order to include the buttons, you need to specify in the config the rows you
You do it by declaring the rows as arrays and its buttons as values, like this:

```yaml
power_row:
- power
media_control_row:
- rewind
- play
- pause
- fast_forward
rows:
power_row:
- power
media_control_row:
- rewind
- play
- pause
- fast_forward
volume_row: slider
numpad_row: true
navigation_row: touchpad
```

The available rows are `power_row`, `channel_row`, `apps_row`, `source_row` and `media_control_row`
There also `volume_row` and `navigation_row`, but these requires a string as value.
The preset rows are `volume_row`, `numpad_row` and `navigation_row`, which requires a string or boolean as value.

| Name | Type | Description
| ---- | ---- | -------
| volume_row | string | Can be either `slider` or `buttons`. This defines the mode you want for setting the volume (you'll see them soon below). You need to have [slider-card](https://github.com/AnthonMS/my-cards) installed in order to use `slider`.
| numpad_row | boolean | If `true`, numpad row will show.
| navigation_row | string | Can be either `touchpad` or `buttons`. This defines the mode you want for navigating around your tv (you'll also see them soon below).

## **Notice**

This card supports `androidtv`, `webostv` and `samsungtv` out of the box. If your TV is from another brand you can use this card by setting [custom buttons](#custom-buttons) with services to send keys to your TV (or do whatever you want) in your way.
This card supports `androidtv`, `webostv`, `roku`, `braviatv` and `samsungtv` out of the box. If your TV is from another brand you can use this card by setting [custom buttons](#custom-buttons) with services to send keys to your TV (or do whatever you want) in your way.
If you have time and wanna help, you can add new integrations to this card. Check [this PR](https://github.com/usernein/tv-card/pull/8).

Platform `webostv` doesn't support power key (see [webOS Integration](https://www.home-assistant.io/integrations/webostv/#turn-on-action))
Expand Down Expand Up @@ -112,16 +118,17 @@ custom_sources:
Then you can easily use these buttons in your card:

```yaml
power_row:
- browser
- power
- input_tv
media_control_row:
- rewind
- play
- pause
- fast_forward
- toggle_light
rows:
power_row:
- browser
- power
- input_tv
media_control_row:
- rewind
- play
- pause
- fast_forward
- toggle_light
```

<img src="assets/custom_keys.png" alt="guide" width="300"/>
Expand Down Expand Up @@ -200,27 +207,28 @@ Add a custom element in your `ui-lovelace.yaml`
```yaml
- type: custom:tv-card
entity: media_player.tv
power_row:
- power
channel_row:
- channel_up
- info
- channel_down
apps_row:
- netflix
- youtube
- spotify
volume_row: slider
navigation_row: touchpad
source_row:
- return
- home
- source
media_control_row:
- rewind
- play
- pause
- fast_forward
rows:
power_row:
- power
channel_row:
- channel_up
- info
- channel_down
apps_row:
- netflix
- youtube
- spotify
volume_row: slider
navigation_row: touchpad
source_row:
- return
- home
- source
media_control_row:
- rewind
- play
- pause
- fast_forward
```

### Example 1
Expand All @@ -232,29 +240,30 @@ type: custom:tv-card
entity: media_player.tv
platform: samsungtv
title: Example 1
power_row:
- power
source_row:
- return
- home
- source
- netflix
apps_row:
- youtube
- spotify
- netflix
navigation_row: touchpad
volume_row: slider
channel_row:
- channel_up
- channel_down
- info
media_control_row:
- rewind
- play
- spotify
- pause
- fast_forward
rows:
power_row:
- power
source_row:
- return
- home
- source
- netflix
apps_row:
- youtube
- spotify
- netflix
navigation_row: touchpad
volume_row: slider
channel_row:
- channel_up
- channel_down
- info
media_control_row:
- rewind
- play
- spotify
- pause
- fast_forward
```

Result:
Expand All @@ -270,27 +279,28 @@ type: custom:tv-card
entity: media_player.tv
platform: samsungtv
title: Example 2
power_row:
- power
channel_row:
- channel_up
- info
- channel_down
apps_row:
- netflix
- youtube
- spotify
volume_row: buttons
navigation_row: buttons
source_row:
- return
- home
- source
media_control_row:
- rewind
- play
- pause
- fast_forward
rows:
power_row:
- power
channel_row:
- channel_up
- info
- channel_down
apps_row:
- netflix
- youtube
- spotify
volume_row: buttons
navigation_row: buttons
source_row:
- return
- home
- source
media_control_row:
- rewind
- play
- pause
- fast_forward
```

Result:
Expand All @@ -306,17 +316,18 @@ type: custom:tv-card
entity: media_player.tv
platform: samsungtv
title: Example 3
power_row:
- power
apps_row:
- netflix
- youtube
- spotify
volume_row: slider
navigation_row: touchpad
source_row:
- return
- home
rows:
power_row:
- power
apps_row:
- netflix
- youtube
- spotify
volume_row: slider
navigation_row: touchpad
source_row:
- return
- home
```

Result:
Expand All @@ -328,15 +339,16 @@ Result:
In any row, if you add an ampty item, there will be an empty/invisible button filling the space:

```yaml
source_row:
- return
- home
- source
media_control_row:
- rewind
-
-
- fast-forward
rows:
source_row:
- return
- home
- source
media_control_row:
- rewind
-
-
- fast-forward
```

<img src="assets/empty_buttons.png" alt="empty buttons example" width="300"/>
Expand Down
Loading