Skip to content

1.3.0 BREAKING RECOMMENDED UPGRADE

Compare
Choose a tag to compare
@thomasloven thomasloven released this 09 Feb 23:20
· 200 commits to master since this release

This release changes the way browser_mod functions are called from the frontend when you want something to happen only on the current device.

Instead of doing

tap_action:
  action: call-service
  service: browser_mod.toast
  service_data:
    message: Hello, world!
    deviceID: this

you now need to do

tap_action:
  action: fire-dom-event
  browser_mod:
    command: toast
    message: Hello, world!

YOU ONLY NEED TO CHANGE THIS IF YOU HAD

deviceID: this

OR

deviceID:
  - this

IN YOUR SERVICE CALL BEFORE


This may be a bit tedious to change, but it'll be worth it in the end, as this will allow for adding new cool functionality in the future.
Also, this change will make sure that browser_mod does not break Home Assistant 2021.3.0 (sic!).

There's also a new service for calling multiple services after each other, and one to put delays in between them.

** It's worth taking the time to re-read the readme**

Oh! And browser_mod devices now correspond to Home Assistant Devices. That's very cool!


For developers of lovelace plugins

This change makes use of the fire-dom-event tap action.
It's actually been in the code for almost a year, but has never been used (yet).
If your lovelace plugin does not support this, they will not work for direct triggering of browser_mod functions.
Calling a service as before still works, though, it's just the deviceID: this that's gone.

See: https://github.com/home-assistant/frontend/blob/8d13745c6b822a76f6724e32c2b10bf57ae645e7/src/panels/lovelace/common/handle-action.ts#L137