From 3a1c570fd80e897ac5d362bd561af4de9f410889 Mon Sep 17 00:00:00 2001 From: Doug Nelson Date: Thu, 29 Aug 2024 15:03:57 -0500 Subject: [PATCH] Introducing Long Press MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v4.0.0 Native support for long pressing / holding down Firemote buttons is here! What's New: - Firemote Button Longpress support (#477) - Support for Amazon Fire INSIGNIA F20 Series TVs (closes #489) - Swedish/Svenska language support (closes #472) - es-419 language for proper AppleTV app names (closes #471) - Proper support for sections layouts (HA experimental) - Added card sizing signaling for masonry layouts - App Launcher for Fox Business (closes #473) - App Launcher for SKY + (closes #474) - App Launcher for Pathé Thuis (closes #476) - App launcher for Claro tv+ (closes #481) - App launcher for BabyTV (closes #482) - App Launcher for Apollo Group TV (closes #491) - App Launcher for DefSquid - Fixed a bug that put too many entities in the entity dropdown - Fixed a click bug when dpad style = Minimal What's Changed: - Re-adjusted the regular Downloader app icon - Custom_launchers YAML now accepts 'action' or 'service' - Various updates for Swedish Translation (closes #472) - Updated RTL + app Launcher (closes #475) - Updated Magenta TV app Launcher (closes #475) - Updated Stremio app Launcher (closes #484) - Fixed bug that prevented text containing a quotation mark from being sent - Added more checks and alerts for users choosing a different remote style than the one that came with their device - Updated GitHub Issue template for Langage Translations - Updates to the readme file - Updated some error messaging - New regular and round logos for downloader app Can't see these changes after updating? Visit this link: https://github.com/PRProd/HA-Firemote/wiki/Force-a-Refresh Can't see language translation updates? Visit this link: https://github.com/PRProd/HA-Firemote/wiki/Changing-Your-Home-Assistant-Language --- README.md | 14 ++++++------- dist/HA-Firemote.js | 9 ++++---- dist/launcher-buttons.js | 44 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 52 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3cfbed0..1bfddec 100644 --- a/README.md +++ b/README.md @@ -208,7 +208,7 @@ Custom app launch buttons are not limited to the few that came printed on your r
## Launcher Button Customizations -You are not limited to only using the launcher buttons that come with Firemote. Through YAML, you can define your own working buttons in one of two ways: defining a script or constructing a service call. +You are not limited to only using the launcher buttons that come with Firemote. Through YAML, you can define your own working buttons in one of two ways: defining a script or constructing an action call. Example: ```yaml @@ -229,7 +229,7 @@ custom_launchers: icon: mdi:lamp color: red background: blue - service: light.toggle + action: light.toggle target: entity_id: light.bedroom_lamp data: @@ -252,9 +252,9 @@ YAML usage: | color | css color value | no | custom color for your text label or your mdi icon
ex: white
ex: '#ff0000' | | background | css color value | no | custom color for your button's background
ex: green
ex: '#ffffff' | | script | string | yes if calling a script | The name of your Home Assistant script | -| service | string | yes if not using a script | The name of the Home Assistant service you want to call | -| target | object | yes if not using a script | Define the entity for your service to act upon | -| data | object | no | optional parameters for your service call | +| action | string | yes if not using a script | The name of the Home Assistant action you want to call | +| target | object | yes if not using a script | Define the entity for your action to act upon | +| data | object | no | optional parameters for your action call | Once defined, a custom button can be assigned to a Firemote button location through the YAML config itself, or it can be selected through the Visual Editor dropdown @@ -266,7 +266,7 @@ Once defined, a custom button can be assigned to a Firemote button location thro
## Button Overrides -Button Overrides can be very useful for customization. These overrides can be used to call a Home Assistant service directly, run a script, or hide a button on your remote. These options are accomplished through your Firemote's YAML configuration. +Button Overrides can be very useful for customization. These overrides can be used to call a Home Assistant action directly, run a script, or hide a button on your remote. These options are accomplished through your Firemote's YAML configuration. Consider this example: ```yaml @@ -276,7 +276,7 @@ button_overrides: volume-down-button: script: receiver_volume_down_script volume-up-button: - service: light.toggle + action: light.toggle target: entity_id: light.bedroom_lamp data: diff --git a/dist/HA-Firemote.js b/dist/HA-Firemote.js index fa4d2ea..bfaba16 100644 --- a/dist/HA-Firemote.js +++ b/dist/HA-Firemote.js @@ -1,9 +1,9 @@ -const HAFiremoteVersion = 'v4.0.0b4'; +const HAFiremoteVersion = 'v4.0.0'; import {LitElement, html, css, unsafeHTML, unsafeCSS, styleMap} from './lit/lit-all.min.js'; -import {launcherData, launcherCSS} from "./launcher-buttons.js?version=v4.0.0b4"; -import {rosettaStone} from './language-translations.js?version=v4.0.0b4'; -import {devices} from './supported-devices.js?version=v4.0.0b4'; +import {launcherData, launcherCSS} from "./launcher-buttons.js?version=v4.0.0"; +import {rosettaStone} from './language-translations.js?version=v4.0.0'; +import {devices} from './supported-devices.js?version=v4.0.0'; console.groupCollapsed("%c 🔥 FIREMOTE-CARD 🔥 %c "+HAFiremoteVersion+" installed ", "color: orange; font-weight: bold; background: black", "color: green; font-weight: bold;"), console.log("Readme:", "https://github.com/PRProd/HA-Firemote"), @@ -202,7 +202,6 @@ class FiremoteCard extends LitElement { }; } - // TODO: This is a part of the beta release - likely should have been included all along // Sets a default card size (height) for masonry dashboard type getCardSize(){ // https://developers.home-assistant.io/docs/frontend/custom-ui/custom-card#sizing-in-masonry-view diff --git a/dist/launcher-buttons.js b/dist/launcher-buttons.js index 3c64279..286d086 100644 --- a/dist/launcher-buttons.js +++ b/dist/launcher-buttons.js @@ -209,6 +209,40 @@ const launcherData = { }, + "apollo-group-tv": { + "button": '', + "button-round": '', + "friendlyName": "Apollo Group TV", + "className": "apolloGroupTVButton", + "deviceFamily": ["amazon-fire", "chromecast", "nvidia-shield", "onn", "xiaomi"], + "amazon-fire": { + "appName": "ctv.apollogroup.androidtv", + "androidName": "tv.apollogroup.androidtv", + "adbLaunchCommand": "adb shell am start -n tv.apollogroup.androidtv/io.nitrix.tvstartupshow.ui.activity.SplashActivity", + }, + "chromecast": { + "appName": "ctv.apollogroup.androidtv", + "androidName": "tv.apollogroup.androidtv", + "adbLaunchCommand": "adb shell am start -n tv.apollogroup.androidtv/io.nitrix.tvstartupshow.ui.activity.SplashActivity", + }, + "nvidia-shield": { + "appName": "ctv.apollogroup.androidtv", + "androidName": "tv.apollogroup.androidtv", + "adbLaunchCommand": "adb shell am start -n tv.apollogroup.androidtv/io.nitrix.tvstartupshow.ui.activity.SplashActivity", + }, + "onn": { + "appName": "ctv.apollogroup.androidtv", + "androidName": "tv.apollogroup.androidtv", + "adbLaunchCommand": "adb shell am start -n tv.apollogroup.androidtv/io.nitrix.tvstartupshow.ui.activity.SplashActivity", + }, + "xiaomi": { + "appName": "ctv.apollogroup.androidtv", + "androidName": "tv.apollogroup.androidtv", + "adbLaunchCommand": "adb shell am start -n tv.apollogroup.androidtv/io.nitrix.tvstartupshow.ui.activity.SplashActivity", + }, + }, + + "app-opener": { "button": "App Opener", "friendlyName": "App Opener", @@ -1536,8 +1570,8 @@ const launcherData = { "downloader": { - "button": '', - "button-round": '', + "button": '', + "button-round": '', "friendlyName": "Downloader", "className": "downloaderButton", "deviceFamily": ["amazon-fire", "chromecast", "nvidia-shield", "onn", "xiaomi"], @@ -6055,7 +6089,7 @@ const launcherData = { "androidName": "com.stremio.one", "deviceFamily": ["amazon-fire", "chromecast", "nvidia-shield", "onn", "xiaomi"], "amazon-fire": { - "adbLaunchCommand": "adb shell am start -n com.stremio.one/com.stremio.MainActivity", + "adbLaunchCommand": "adb shell am start -n com.stremio.one/com.stremio.tv.MainActivity", }, "chromecast": { "adbLaunchCommand": "adb shell am start -n com.stremio.one/com.stremio.tv.MainActivity", @@ -7950,6 +7984,10 @@ const launcherCSS = ` width: calc(var(--sz) * 3.75rem); } + .apolloGroupTVButton { + background: #fff; + } + .appleArcadeButton { background: linear-gradient(0deg, rgba(255,45,80,1) 0%, rgba(255,115,85,1) 100%); }