Releases: Nerwyn/android-tv-card
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
3.2.6 - Better Buttons With Home Assistant Actions
Changes in 3.2.6:
- Further slider scrolling detection improvements.
- Added missing Firefox slider styles.
- Tweaked slider styles for better performance and customizability.
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.
Full Changelog: 3.1.3...3.2.6
3.2.5 - Better Buttons With Home Assistant Actions
Changes in 3.2.5:
- 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.
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.
Full Changelog: 3.1.3...3.2.5
3.2.4 - Better Buttons With Home Assistant Actions
Changes in 3.2.4:
- Fix button mode icon.
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.
Full Changelog: 3.1.3...3.2.4
3.2.3 - Better Buttons With Home Assistant Actions
Changes in 3.2.3:
- 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.
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.
Full Changelog: 3.1.3...3.2.3
3.2.2 - Better Buttons With Home Assistant Actions
Changes in 3.2.2:
- Use js-yaml to parse template results in rows array that are yaml strings so templating can be used to define multiple remote elements.
Do more with buttons!
This release is focused on improving buttons and custom actions. Custom actions now follow Home Assistant actions syntax, and supports a subset of 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
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.
Full Changelog: 3.1.3...3.2.2
3.2.1 - Better Buttons With Home Assistant Actions
Changes in 3.2.1:
- Do not add
hold_secs = 0.5
to data on custom hold call-service 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 a subset of 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
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.
Full Changelog: 3.1.3...3.2.1
3.2.0 - Better Buttons With Home Assistant 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 a subset of 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
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
.
Full Changelog: 3.1.3...3.2.0
3.1.3 - Nunjucks Templating
Templating!
Home Assistant templating is powered by the jinja2 templating engine for Python. Because Home Assistant (like most web front ends) is written in JavaScript/TypeScript, implementing jinja2 templating in custom cards is difficult. Other custom add-ons (namely card-mod, created by a much better front end engineer than I) solve this by having the Home Assistant backend process the templates. Implementing this is difficult, but I think I've found an alternate much easier to implement solution.
Powered by Nunjucks
Nunjucks is a templating engine for JavaScript heavily based on jinja2. The templates are almost exactly like native Home Assistant jinja2 templates but are processed in the front end.
The following functions have been implemented:
states
is_state
state_attr
is_state_attr
has_value
iif
match_media
Some examples of Nunjucks templating:
rows:
- - '{{ "navigation_buttons" if match_media("(orientation: landscape)") else "navigation_touchpad" }}'
- - '{{ "sunroom_light" if is_state("light.sunroom_ceiling", "off") else "volume_slider" }}'
custom_keys:
sunroom_light:
icon: >-
{{ iif(is_state("light.sunroom_ceiling", "on"), "mdi:ceiling-light",
"mdi:ceiling-light-outline") }}
service: light.toggle
data:
entity_id: light.sunroom_ceiling
style:
color: |
{% if is_state("light.sunroom_ceiling", "on") %}
rgb({{ state_attr("light.sunroom_ceiling", "rgb_color") }})
{% endif %}
If you want additional functions from the Home Assistant templating documentation (or other functionality that may be useful) to be added, please create a feature request.
Other changes:
- Volume buttons will now render in reverse when in a column (volume up on the top, volume down on the bottom).
- Fixed
rakutentv
logo. - Switched to ha-nunjucks package and removed local utility function.
- Added material ripple effects to the touchpad.
- Fixed keyboard mode check.