Releases: Nerwyn/android-tv-card
3.6.0 - Popup Support, Tooltip Styles, Autofill Targets, and Row/Column IDs
New Action - fire-dom-event
You can now fire DOM events as an action! This is useful for opening browser mod popup cards. See the README for a quick example and the browser mod documentation for more information.
More Tooltip Options #74
You can now customize the tooltips label, offset, transform function, and display using these slider CSS properties:
--tooltip-label
, defaults to{{ VALUE }}
.VALUE
corresponds to the current slider value.
--tooltip-offset
, defaults to{{ OFFSET }}px
.OFFSET
corresponds to the tooltip x offset from center in pixels.
--tooltip-transform
, defaults totranslateX(var(--tooltip-offset))
.--tooltip-display
, defaults toinitial
.- Deprecated field
tooltip
will also set this property.
- Deprecated field
Autofill Remote and Media Player IDs in Service Calls #73
The media_player_id
field has been restored and a new field autofill_entity_id
has been added. If the latter is enabled, any service call actions that do not have a target ID (entity, device, or area) will have their entity ID fields autopopulated if their service call domains are remote
or media_player
and the corresponding remote_id
or media_player_id
fields are populated. media_player_id
will also work as slider_id
if the latter is not provided and autofill for kodi
and denonavr
domain service calls.
Row and Column IDs for Card-Mod Styling #63
All rows and columns now have a unique ID that can be used for styling using card-mod. See this comment for an example.
Other Changes
- Even more slider performance and render improvements.
- Sliders will now properly update if their value is changed by something else after the user has touched them.
VALUE
andHOLD_SECS
can be used in most templates that do not apply to the root remote element.- Deprecated
tooltip
in favor of style options. - Change the amount of time slider waits before allowing for value updates from Home Assistant after using it using
value_from_hass_delay
(defaults to 1000ms). - Slider will update once per second if it's value attribute is
media_position
. - Keyboard buttons should no longer erroneously trigger and error due to regular button action handlers.
Full Changelog: 3.5.2...3.6.0
3.5.2 - Slider Improvements
Changes in 3.5.2
- Slider
value_attribute
can now use attributes that are arrays, likehs_color[0]
. - Service call data can now include
VALUE
and templates in array data.
Slider Tooltip
Sliders now show a tooltip with the current value when held down on, similar to Home Assistant tile sliders. You can disable this by setting tooltip
to false in a custom action for the slider.
The slider has also been refactored so it should perform a bit better, and shouldn't prematurely update it's value right after it sends an action, causing it to rubber band between the old and new values. The logic for turning the slider on and off has also been improved so it should update faster.
As part of standardizing the slider in this project with my other custom tile feature project, some slider related fields have been deprecated and moved to a slider custom action (old remote configs should continue to work).
slider_range
->custom_actions.slider.range
.slider_style
->custom_actions.slider.style
.slider_attribute
->custom_actions.slider.value_attribute
.enable_slider_feedback
->custom_actions.slider.haptics
.
You can now also set the slider step
value in a custom action for the slider.
Haptics
You can now enable or disable haptics for specific buttons by setting haptics
to true or false within their custom actions.
The following fields have been renamed:
enable_button_feedback
->button_haptics
.enable_touchpad_feedback
->touchpad_haptics
.
custom_actions:
slider:
range:
- 0.5
- 1
step: 0.1
value_attribute: brightness # defaults to volume_level
tooltip: true # defaults to true so you don't really need this line
haptics: false # defaults to true
style:
'--border-radius': 4px
Other Changes
- Fixed slider ID logic bug which would cause multiple sliders in different copies of the same card to use the same slider ID or not work at all #67.
- And another issue where default actions were being overwritten in one copy of this card and those changes showing up in another.
Patch Version Changes
- Mouse and touch event handlers are now always added to the element to fix support on environments such as the MacOS Home Assistant app (which says it has touch event handlers even if the devices does not have a touch screen) and tablets with desktop browsers.
- Prevent context menu from appearing when using touch hold actions on desktop browsers.
- Prevent touchpad center action from firing at the end of a multi touch action.
- Slider
value_attribute
can now use attributes that are arrays, likehs_color[0]
. - Service call data can now include
VALUE
and templates in array data.
Full Changelog: 3.4.0...3.5.2
3.5.1 - Slider Improvements
Changes in 3.5.1
- Mouse and touch event handlers are now always added to the element to fix support on environments such as the MacOS Home Assistant app (which says it has touch event handlers even if the devices does not have a touch screen) and tablets with desktop browsers #70.
- Prevent context menu from appearing when using touch hold actions on desktop browsers.
- Prevent touchpad center action from firing at the end of a multi touch action.
Slider Tooltip
Sliders now show a tooltip with the current value when held down on, similar to Home Assistant tile sliders. You can disable this by setting tooltip
to false in a custom action for the slider.
The slider has also been refactored so it should perform a bit better, and shouldn't prematurely update it's value right after it sends an action, causing it to rubber band between the old and new values. The logic for turning the slider on and off has also been improved so it should update faster.
As part of standardizing the slider in this project with my other custom tile feature project, some slider related fields have been deprecated and moved to a slider custom action (old remote configs should continue to work).
slider_range
->custom_actions.slider.range
.slider_style
->custom_actions.slider.style
.slider_attribute
->custom_actions.slider.value_attribute
.enable_slider_feedback
->custom_actions.slider.haptics
.
You can now also set the slider step
value in a custom action for the slider.
Haptics
You can now enable or disable haptics for specific buttons by setting haptics
to true or false within their custom actions.
The following fields have been renamed:
enable_button_feedback
->button_haptics
.enable_touchpad_feedback
->touchpad_haptics
.
custom_actions:
slider:
range:
- 0.5
- 1
step: 0.1
value_attribute: brightness # defaults to volume_level
tooltip: true # defaults to true so you don't really need this line
haptics: false # defaults to true
style:
'--border-radius': 4px
Other Changes
- Fixed slider ID logic bug which would cause multiple sliders in different copies of the same card to use the same slider ID or not work at all #67.
- And another issue where default actions were being overwritten in one copy of this card and those changes showing up in another.
Patch Version Changes
- Mouse and touch event handlers are now always added to the element to fix support on environments such as the MacOS Home Assistant app (which says it has touch event handlers even if the devices does not have a touch screen) and tablets with desktop browsers.
- Prevent context menu from appearing when using touch hold actions on desktop browsers.
- Prevent touchpad center action from firing at the end of a multi touch action.
Full Changelog: 3.4.0...3.5.1
3.5.0 - Slider Improvements
Slider Tooltip
Sliders now show a tooltip with the current value when held down on, similar to Home Assistant tile sliders. You can disable this by setting tooltip
to false in a custom action for the slider.
The slider has also been refactored so it should perform a bit better, and shouldn't prematurely update it's value right after it sends an action, causing it to rubber band between the old and new values. The logic for turning the slider on and off has also been improved so it should update faster.
As part of standardizing the slider in this project with my other custom tile feature project, some slider related fields have been deprecated and moved to a slider custom action (old remote configs should continue to work).
slider_range
->custom_actions.slider.range
.slider_style
->custom_actions.slider.style
.slider_attribute
->custom_actions.slider.value_attribute
.enable_slider_feedback
->custom_actions.slider.haptics
.
You can now also set the slider step
value in a custom action for the slider.
Haptics
You can now enable or disable haptics for specific buttons by setting haptics
to true or false within their custom actions.
The following fields have been renamed:
enable_button_feedback
->button_haptics
.enable_touchpad_feedback
->touchpad_haptics
.
custom_actions:
slider:
range:
- 0.5
- 1
step: 0.1
value_attribute: brightness # defaults to volume_level
tooltip: true # defaults to true so you don't really need this line
haptics: false # defaults to true
style:
'--border-radius': 4px
Other Changes
- Fixed slider ID logic bug which would cause multiple sliders in different copies of the same card to use the same slider ID or not work at all #67.
- And another issue where default actions were being overwritten in one copy of this card and those changes showing up in another.
Full Changelog: 3.4.0...3.5.0
3.4.0 - Momentary Buttons, Customizable Timings, and Fire TV Keyboard
Momentary Buttons #58
This release adds an alternate button operating mode, momentary buttons. While disabled by default for all buttons and the touchpad, it can be enabled by creating custom actions for any button or the touchpad center
action using action types momentary_start_action
and momentary_end_action
.
momentary_start_action
fires when the button is initially pressed down and momentary_end_action
fires when the button is released. Configuring either of these and setting their action
fields to anything except none
(or if their templates resolve do not resolve to none
) will disable the buttons tap, hold, and double tap actions completely.
You can use momentary button mode to include HOLD_SECS
in the momentary_end_action
service call data
custom_actions:
momentary_light:
icon: mdi:ceiling-light
momentary_start_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
momentary_end_action:
action: call-service
service: light.turn_off
data:
entity_id: light.sunroom_ceiling
fast_forward:
momentary_start_action:
action: none
momentary_end_action:
action: call-service
service: remote.send_command
data:
entity_id: remote.google_tv
command: MEDIA_FAST_FORWARD
hold_secs: HOLD_SECS
Customizable Timings #60
You can now customize the delay between repeats for repeated hold actions using repeat_delay
(default 100ms), the amount of time you have to trigger a double tap action using double_tap_window
(default 200ms), and the amount of time you need to hold down a button to trigger a hold action using hold_time
(default 500ms).
Note: setting double_tap_window
larger than (or too close to) hold_time
may result in undesirable behavior. Make sure to adjust both accordingly! Also, increasing double_tap_window
will delay single tap actions even further.
All three of these values can be set either globally in the config root, or for specific custom actions like so.
repeat_delay: 200
double_tap_window: 500
hold_time: 1000
custom_actions:
volume_up:
hold_action:
action: repeat
repeat_delay: 50
center:
double_tap_action:
action: key
key: BACK
double_tap_window: 300
hold_action:
action: key
key: MENU
hold_time: 600
Fire TV Keyboard Mode #62
While Fire TV is a fork of Android (until Amazon switches to their own proprietary OS in the future) and works with the current Android TV ADB keyboard for alphanumeric keys, it does not work with the backspace, delete, and enter keys as they are currently being sent with the Android Remote TV API, which Fire TV does not support. You can now set keyboard_mode
to FIRE TV
to fix support for these keys and send them via ADB instead.
Other Changes
- Fix some overlooked auto field setting code for multi actions.
- Fix empty buttons not generating correctly.
- Change touchpad and slider background colors to
--primary-background-color
, as the previous--secondary-background-color
color gets overwritten by Home Assistant to the default theme value if set to a different color in a custom theme.- Not sure if this was a recent change in Home Assistant, and if it's a bug or desired behavior.
Full Changelog: 3.3.0...3.4.0
3.3.0 - Multi Touch and More Customizable Repeat on Hold
Multi Touch Touchpad Gestures
This release implements a long awaited feature request, multi touch touchpad gestures #13. Invoke multi finger tap and swipe gestures on the touchpad by creating custom actions on up
, down
, left
, right
, and center
with action types multi_tap_action
, multi_hold_action
, and multi_double_tap_action
.
custom_actions:
up:
multi_tap_action:
action: key
key: VOLUME_UP
down:
multi_tap_action:
action: key
key: VOLUME_DOWN
left:
multi_tap_action:
action: key
key: MEDIA_REWIND
right:
multi_tap_action:
action: key
key: MEDIA_FAST_FORWARD
center:
double_tap_action:
action: key
key: BACK
multi_tap_action:
action: call-service
service: light.toggle
target:
entity_id: light.ceiling
multi_hold_action:
action: key
key: HOME
multi_double_tap_action:
action: key
key: MUTE
Repeat on Hold
Any button and touchpad tap actions can now be made repeatable by setting the hold_action
action
field to repeat
. By default the following default actions repeat when held, whether they are buttons or part of the touchpad:
up
down
left
right
volume_up
volume_down
delete
forward_delete
Similarly, the the above actions can be made not to repeat when held by setting their hold_action
to something else.
custom_actions:
channel_up:
hold_action:
action: repeat
channel_down:
hold_action:
action: repeat
volume_up:
# this remaps volume up hold to a different action instead of the default repeat
hold_action:
action: call-service
service: media_player.volume_set
data:
entity_id: media_player.google_tv
volume_level: 1
volume_down:
# this disables volume down from repeating when held
hold_action:
action: none
Other changes:
- Improved touchpad swipe direction detection and decreased sensitivity.
- Held swipe direction can now be changed mid swipe.
- Slider render fixes.
- Refactored how button and touchpad actions are called.
- Changed vibration levels to be
light
for all tap actions,medium
for all normal hold actions, andselection
(extra light) for repeated hold actions. - Fix button styles so there is not black/blue background when using them.
- Fix keyboard buttons behavior to not trigger regular button actions erroneously, to also have scroll blocking logic of regular buttons, and to also use the mouseup/touchend handlers instead of onClick
Full Changelog: 3.2.10...3.3.0
3.2.10 - Better Buttons With Home Assistant Actions
Changes in 3.2.10
- Merge
data
,target
, andservice_data
fields intodata
if any exist rather than on action type.
Do more with buttons!
This release is focused on improving buttons and custom actions. Custom actions now follow Home Assistant actions syntax, and supports most actions defined there along with the key
and source
actions from this card. Confirmations are also supported.
The following actions are supported:
key
source
call-service
navigate
url
assist
more-info
none
Buttons now support not only tap actions, but double tap and hold actions! Just like the touchpad center
tap. The touchpad center
double tap and hold actions are now configured in this way, and the old separate fields for enabling and remapping center taps have been deprecated. Also, double tap actions on buttons and the touchpad now work on iPhone!
custom_actions:
light_color:
icon: mdi:lightbulb{{ "-outline" if is_state("light.sunroom_ceiling", "off") }}
style:
color: rgb({{ state_attr("light.sunroom_ceiling", "rgb_color") }}
tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: red
hold_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: blue
double_tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: green
Other changes:
- Remapped hold actions do not add
hold_secs: 0.5
toremote.send_command
service calls. - Deprecated options:
enable_double_click
anddouble_click_keycode
- touchpad double tap is now enabled and reassigned by creating a custom action forcenter
and creating adouble_tap_action
.long_click_keycode
- now reassigned by creating a custom action forcenter
and creating ahold_action
.custom_keys
andcustom_sources
- are now justcustom_actions
.
Patch version changes:
- Do not add
hold_secs = 0.5
to data on custom hold call-service actions. - Use js-yaml to parse template results in rows array that are yaml strings so templating can be used to define multiple remote elements.
- Sliders can now be used for any action.
- Fixed
url
action to work better on mobile and to match Home Assistant frontend code. - Added
assist
andmore-info
actions. - Fix button mode icon.
- Deprecate
svg_path
, useicon
for icon packs, custom icons, and svg paths. - Users can now use default svg icons that come with this card for custom actions.
- Fix icon so that templates can be used with non-pack icons.
- Prevent button and slider actions when scrolling #50.
- Update Apple TV example #51.
- Further slider scrolling detection improvements.
- Added missing Firefox slider styles.
- Tweaked slider styles for better performance and customizability.
- Support for older webviews that do not support the
structuredClone
function. - Merge
data
,target
, andservice_data
fields intodata
if any exist rather than on action type.
Full Changelog: 3.1.3...3.2.10
3.2.9 - Better Buttons With Home Assistant Actions
Changes in 3.2.9
- Also merge
data
,target
, andservice_data
fields formore-info
actions.- And do so after action is autofilled if empty.
Do more with buttons!
This release is focused on improving buttons and custom actions. Custom actions now follow Home Assistant actions syntax, and supports most actions defined there along with the key
and source
actions from this card. Confirmations are also supported.
The following actions are supported:
key
source
call-service
navigate
url
assist
more-info
none
Buttons now support not only tap actions, but double tap and hold actions! Just like the touchpad center
tap. The touchpad center
double tap and hold actions are now configured in this way, and the old separate fields for enabling and remapping center taps have been deprecated. Also, double tap actions on buttons and the touchpad now work on iPhone!
custom_actions:
light_color:
icon: mdi:lightbulb{{ "-outline" if is_state("light.sunroom_ceiling", "off") }}
style:
color: rgb({{ state_attr("light.sunroom_ceiling", "rgb_color") }}
tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: red
hold_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: blue
double_tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: green
Other changes:
- Remapped hold actions do not add
hold_secs: 0.5
toremote.send_command
service calls. - Deprecated options:
enable_double_click
anddouble_click_keycode
- touchpad double tap is now enabled and reassigned by creating a custom action forcenter
and creating adouble_tap_action
.long_click_keycode
- now reassigned by creating a custom action forcenter
and creating ahold_action
.custom_keys
andcustom_sources
- are now justcustom_actions
.
Patch version changes:
- Do not add
hold_secs = 0.5
to data on custom hold call-service actions. - Use js-yaml to parse template results in rows array that are yaml strings so templating can be used to define multiple remote elements.
- Sliders can now be used for any action.
- Fixed
url
action to work better on mobile and to match Home Assistant frontend code. - Added
assist
andmore-info
actions. - Fix button mode icon.
- Deprecate
svg_path
, useicon
for icon packs, custom icons, and svg paths. - Users can now use default svg icons that come with this card for custom actions.
- Fix icon so that templates can be used with non-pack icons.
- Prevent button and slider actions when scrolling #50.
- Update Apple TV example #51.
- Further slider scrolling detection improvements.
- Added missing Firefox slider styles.
- Tweaked slider styles for better performance and customizability.
- Support for older webviews that do not support the
structuredClone
function. - Also merge
data
,target
, andservice_data
fields formore-info
actions.- And do so after action is autofilled if empty.
Full Changelog: 3.1.3...3.2.9
3.2.8 - Better Buttons With Home Assistant Actions
Changes in 3.2.8
- Also merge
data
,target
, andservice_data
fields formore-info
actions.
Do more with buttons!
This release is focused on improving buttons and custom actions. Custom actions now follow Home Assistant actions syntax, and supports most actions defined there along with the key
and source
actions from this card. Confirmations are also supported.
The following actions are supported:
key
source
call-service
navigate
url
assist
more-info
none
Buttons now support not only tap actions, but double tap and hold actions! Just like the touchpad center
tap. The touchpad center
double tap and hold actions are now configured in this way, and the old separate fields for enabling and remapping center taps have been deprecated. Also, double tap actions on buttons and the touchpad now work on iPhone!
custom_actions:
light_color:
icon: mdi:lightbulb{{ "-outline" if is_state("light.sunroom_ceiling", "off") }}
style:
color: rgb({{ state_attr("light.sunroom_ceiling", "rgb_color") }}
tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: red
hold_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: blue
double_tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: green
Other changes:
- Remapped hold actions do not add
hold_secs: 0.5
toremote.send_command
service calls. - Deprecated options:
enable_double_click
anddouble_click_keycode
- touchpad double tap is now enabled and reassigned by creating a custom action forcenter
and creating adouble_tap_action
.long_click_keycode
- now reassigned by creating a custom action forcenter
and creating ahold_action
.custom_keys
andcustom_sources
- are now justcustom_actions
.
Patch version changes:
- Do not add
hold_secs = 0.5
to data on custom hold call-service actions. - Use js-yaml to parse template results in rows array that are yaml strings so templating can be used to define multiple remote elements.
- Sliders can now be used for any action.
- Fixed
url
action to work better on mobile and to match Home Assistant frontend code. - Added
assist
andmore-info
actions. - Fix button mode icon.
- Deprecate
svg_path
, useicon
for icon packs, custom icons, and svg paths. - Users can now use default svg icons that come with this card for custom actions.
- Fix icon so that templates can be used with non-pack icons.
- Prevent button and slider actions when scrolling #50.
- Update Apple TV example #51.
- Further slider scrolling detection improvements.
- Added missing Firefox slider styles.
- Tweaked slider styles for better performance and customizability.
- Support for older webviews that do not support the
structuredClone
function. - Also merge
data
,target
, andservice_data
fields formore-info
actions.
Full Changelog: 3.1.3...3.2.8
3.2.7 - Better Buttons With Home Assistant Actions
Changes in 3.2.7:
- Support for older webviews that do not support the
structuredClone
function.
Do more with buttons!
This release is focused on improving buttons and custom actions. Custom actions now follow Home Assistant actions syntax, and supports most actions defined there along with the key
and source
actions from this card. Confirmations are also supported.
The following actions are supported:
key
source
call-service
navigate
url
assist
more-info
none
Buttons now support not only tap actions, but double tap and hold actions! Just like the touchpad center
tap. The touchpad center
double tap and hold actions are now configured in this way, and the old separate fields for enabling and remapping center taps have been deprecated. Also, double tap actions on buttons and the touchpad now work on iPhone!
custom_actions:
light_color:
icon: mdi:lightbulb{{ "-outline" if is_state("light.sunroom_ceiling", "off") }}
style:
color: rgb({{ state_attr("light.sunroom_ceiling", "rgb_color") }}
tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: red
hold_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: blue
double_tap_action:
action: call-service
service: light.turn_on
data:
entity_id: light.sunroom_ceiling
color_name: green
Other changes:
- Remapped hold actions do not add
hold_secs: 0.5
toremote.send_command
service calls. - Deprecated options:
enable_double_click
anddouble_click_keycode
- touchpad double tap is now enabled and reassigned by creating a custom action forcenter
and creating adouble_tap_action
.long_click_keycode
- now reassigned by creating a custom action forcenter
and creating ahold_action
.custom_keys
andcustom_sources
- are now justcustom_actions
.
Patch version changes:
- Do not add
hold_secs = 0.5
to data on custom hold call-service actions. - Use js-yaml to parse template results in rows array that are yaml strings so templating can be used to define multiple remote elements.
- Sliders can now be used for any action.
- Fixed
url
action to work better on mobile and to match Home Assistant frontend code. - Added
assist
andmore-info
actions. - Fix button mode icon.
- Deprecate
svg_path
, useicon
for icon packs, custom icons, and svg paths. - Users can now use default svg icons that come with this card for custom actions.
- Fix icon so that templates can be used with non-pack icons.
- Prevent button and slider actions when scrolling #50.
- Update Apple TV example #51.
- Further slider scrolling detection improvements.
- Added missing Firefox slider styles.
- Tweaked slider styles for better performance and customizability.
- Support for older webviews that do not support the
structuredClone
function.
Full Changelog: 3.1.3...3.2.7