Skip to content

Commit

Permalink
Added Support for 2nd Gen Stick
Browse files Browse the repository at this point in the history
Added Support for 2nd Gen Stick
  • Loading branch information
PRProd committed Jan 24, 2023
1 parent 7015907 commit 95701be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions HA-Firemote.js
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ class FiremoteCard extends LitElement {
}


if (deviceType == 'fire_stick_4k' || deviceType == 'fire_tv_3rd_gen') {
if (deviceType == 'fire_stick_4k' || deviceType == 'fire_tv_3rd_gen' || deviceType == 'fire_stick_second_gen') {
return html`
<ha-card>
Expand Down Expand Up @@ -1619,7 +1619,8 @@ class FiremoteCard extends LitElement {
if(deviceType == 'fire_tv_cube_third_gen') {
var eventListenerBinPath = '/dev/input/event3';
}
if(deviceType == 'fire_stick_4k' || deviceType == 'fire_tv_stick_lite' || deviceType == 'fire_tv_3rd_gen') {
if(deviceType == 'fire_stick_4k' || deviceType == 'fire_tv_stick_lite' ||
deviceType == 'fire_tv_3rd_gen' || deviceType == 'fire_stick_second_gen') {
var eventListenerBinPath = '/dev/input/event4';
}
if(deviceType == 'fire_tv_stick_4k_max' || deviceType == 'fire_tv_cube_second_gen') {
Expand All @@ -1637,7 +1638,8 @@ class FiremoteCard extends LitElement {
if(compatibility_mode == 'strong') {
this.hass.callService("media_player", "toggle", { entity_id: this._config.entity});
}
else if(deviceType == 'fire_stick_4k' || deviceType == 'fire_tv_stick_4k_max' || deviceType == 'fire_tv_3rd_gen') {
else if(deviceType == 'fire_stick_4k' || deviceType == 'fire_tv_stick_4k_max' ||
deviceType == 'fire_tv_3rd_gen' || deviceType =='fire_stick_second_gen') {
if(stateStr != 'off' && stateStr != 'unavailable') {
this.hass.callService("media_player", "turn_off", { entity_id: this._config.entity});
}
Expand Down Expand Up @@ -2038,7 +2040,7 @@ class FiremoteCardEditor extends LitElement {
<option value="fire_tv_3rd_gen">Fire TV Stick (3rd Gen - 2020)</option>
<option value="fire_tv_stick_lite">Fire TV Stick Lite (1st Gen - 2020)</option>
<option value="fire_stick_4k">Fire TV Stick 4K (1st Gen - 2018)</option>
<option value="fire_stick_second_gen" disabled>Fire TV Stick (2nd gen - 2016 - 2019)</option>
<option value="fire_stick_second_gen">Fire TV Stick (2nd gen - 2016 - 2019)</option>
<option value="fire_stick_basic" disabled>Fire TV Stick (Basic Edition - 2017)</option>
<option value="fire_stick_second_gen_2015" disabled>Fire TV Stick (2nd Gen - 2015)</option>
<option value="fire_stick_first_gen">Fire TV Stick (1st gen - 2014)</option>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Options:
| ----------- | ------ | -------- | ------------------------------------------------------------- | -------------------------------------- |
| type | string | yes | custom:firemote-card | Type of the card |
| entity | string | yes | any valid entity created in the android tv integration | entity_id |
| device_type | string | yes | [fire_tv_toshiba_v35](https://github.com/PRProd/HA-Firemote/wiki/Smart-TV---Toshiba-V35-Series-LED-FHD-HD---Fire-TV-(2021)) <br> [fire_tv_4_series](https://github.com/PRProd/HA-Firemote/wiki/Smart-TV---Fire-TV-4-Series-(2021)) <br> [fire_tv_cube_third_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Cube---3rd-Gen-(2022)) <br> [fire_tv_cube_second_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Cube---2nd-Gen-(2019)) <br> [fire_tv_stick_4k_max](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick-4K-Max---1st-Gen-(2021)) <br> [fire_tv_3rd_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick---3rd-Gen-(2020)) <br> [fire_tv_stick_lite](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick-Lite---1st-Gen-(2020)) <br> [fire_stick_4k](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick-4K---1st-Gen-(2018)) <br> [fire_stick_first_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick-1st-Gen-(2014)) | The type of device you are controlling<br>[Which devices are supported?](https://github.com/PRProd/HA-Firemote/wiki/Existing-Amazon-Devices---Support-Chart)<br>[Which device do I own?](https://developer.amazon.com/docs/fire-tv/device-specifications.html) |
| device_type | string | yes | [fire_tv_toshiba_v35](https://github.com/PRProd/HA-Firemote/wiki/Smart-TV---Toshiba-V35-Series-LED-FHD-HD---Fire-TV-(2021)) <br> [fire_tv_4_series](https://github.com/PRProd/HA-Firemote/wiki/Smart-TV---Fire-TV-4-Series-(2021)) <br> [fire_tv_cube_third_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Cube---3rd-Gen-(2022)) <br> [fire_tv_cube_second_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Cube---2nd-Gen-(2019)) <br> [fire_tv_stick_4k_max](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick-4K-Max---1st-Gen-(2021)) <br> [fire_tv_3rd_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick---3rd-Gen-(2020)) <br> [fire_tv_stick_lite](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick-Lite---1st-Gen-(2020)) <br> [fire_stick_4k](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick-4K---1st-Gen-(2018)) <br> [fire_stick_second_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick---2nd-Gen-(2016---2019)) <br> [fire_stick_first_gen](https://github.com/PRProd/HA-Firemote/wiki/Fire-TV-Stick-1st-Gen-(2014)) | The type of device you are controlling<br>[Which devices are supported?](https://github.com/PRProd/HA-Firemote/wiki/Existing-Amazon-Devices---Support-Chart)<br>[Which device do I own?](https://developer.amazon.com/docs/fire-tv/device-specifications.html) |
| compatibility_mode | string | no | default <br> strong <br> event0 <br> event1 <br> event2 <br> event3 <br> event4 <br> event5 <br> event6 <br> event7 <br> event8 <br> | Adjust this value only if your buttons are completely unresponsive<br>[FAQ Available for additional help](https://github.com/PRProd/HA-Firemote#faq) |
| app_launch_1<br>app_launch_2<br>app_launch_3<br>app_launch_4<br>app_launch_5<br>app_launch_6 | string | no | amc-plus<br>apple-tv<br>bbc-iplayer<br>bell-fibe-tv<br>cnn<br>crave-tv<br>cyberghost<br>disney-plus<br>emby<br>hbo-max<br>hulu<br>jellyfin<br>netflix<br>news<br>nordvpn<br>pandora<br>paramount-plus<br>paramount-plus-de<br>plex<br>prime-video<br>shophq<br>showtime<br>spotify<br>starz<br>tennis-channel<br>twitch<br>youtube<br>youtubeTV<br>vlc<br>waipuTV<br>youtube<br>youtubeTV<br>xfinityStream<br>zattoo<br>hdmi_1<br>hdmi_2<br>hdmi_3<br>hdmi_4 | Quick launch apps customization |
|hdmi_1<br>hdmi_2<br>hdmi_3</br>hdmi_4| string | no | Personalized name for this HDMI input | The name entered here will appear on the button (truncated to 8 characters to fit)|
Expand Down

0 comments on commit 95701be

Please sign in to comment.