Skip to content

v13.1.0

Choose a tag to compare

@github-actions github-actions released this 01 Apr 19:23

This release is a minor one and it doesn't represent a breaking change. It introduces new themable options, a new JavaScript method and an improvement to the logic to decide which item to select in the sidebar taking into account the URL of the visited panel.

1. New themeable options

This release adds new themable options related to the sidebar menu button.

Options Type Required Description
sidebar_button_color_hover* String no Sets the color of the sidebar hamburger menu in a hover state
sidebar_button_background_hover* String no Sets the background of the sidebar hamburger menu in a hover state. It could be a color or a background declaration. If it is not specified, the sidebar_button_color_hover will be used, and if this one is not specified too, the sidebar_button_color will be used
sidebar_button_background_hover_opacity* Number or String no Sets the opacity of the background of the sidebar hamburger menu in a hover state. It should be a number between 0 (fully transparent) and 1 (fully opaque). If it is not specified, the default 0.1 will be used

Note: * These options allow JavaScript or Jinja templates.

2. A new JavaScript method to show notification toasts

In this release a new method will be available in the JavaScript templates:

showToast

This method shows a notification toast using a string or a translation resource. Optionally, it is possible to add a button with an action to the notification tost.

// Show a notification toast with a string message
showToast({
  message: 'Toast example'
});

// Show a notification toast with a translation key
showToast({
  message: {
    translationKey: 'ui.dialogs.restart.reboot.action_toast'
  }
});

// Show a notification toast with an action
showToast({
  message: 'Toast example',
  action: {
    action: () => {
      console.log('action clicked!!');
    },
    text: 'Action example'
  }
});

// Show a notification toast with a longer duration
showToast({
  message: 'Toast example',
  duration: 10000 // 10 seconds
});

3. Improved the logic to highlight the selected item

The logic to highlight the sidebar item depending on the selected URL has been improved. Now, it excludes the items that are hidden, so if there are hidden items with the same URL that visible ones, they will not be taken into account for the selection logic.

4. Updated direct dependencies

The direct dependencies of the plugin have been updated:

  • home-assistant-javascript-templates: from 6.0.1 to 7.0.0
  • home-assistant-query-selector: from 5.0.0 to 6.0.1
  • home-assistant-styles-manager: from 4.0.0 to 4.1.0

🚀 Features

🧩 Dependencies

  • Solve vulnerabilities through pnpm overrides
  • [Dependencies]: Bump the dependencies-dev group with 2 updates
  • [Dependencies]: Bump the dependencies-dev group with 2 updates
  • [Dependencies]: Bump home-assistant-javascript-templates from 6.0.0 to 6.0.1 in the dependencies-prod group
  • [Dependencies]: Bump the dependencies-dev group with 3 updates
  • [Dependencies]: Bump the dependencies-dev group with 1 update
  • [Dependencies]: Bump home-assistant-styles-manager from 3.1.0 to 4.0.0 in the dependencies-prod group across 1 directory
  • Migrate project to TypeScript 6
  • Custom sidebar next release

⚙️ Configuration

  • [Github Actions]: Bump dorny/paths-filter from 3 to 4 in the actions-deps group
  • [Github Actions]: Bump the actions-deps group across 1 directory with 2 updates
  • [Github Actions]: Bump actions/deploy-pages from 4 to 5 in the actions-deps group across 1 directory
  • Migrate project to TypeScript 6