UIX Broker, part of UI eXtension (UIX) allows to turn browser events, keyboard shortcuts, and Home Assistant event-bus events into declarative interactions.
Use UIX Broker when an interface behaviour can be configured rather than written as a custom card, script, or patch. UIX Broker can react to a click, customise an event before redispatching it, focus an element, update an object property, invoke a safe element method, and run JavaScript actions with interaction variables available.
Hot off the press in 8.2.0-beta.7 is a button directive that allows to place a ha-button on UI. Also added uix-broker-ready event which can you listen for in browser realm, an independent wait directive if needed to wait for longer than usual before running further directives and new UIX action event which also can take an anchor to allow native Browser events to be fired via fire-dom-event.
Added uix-broker-ready event as well as independent wait directive to be able to readily add UI elements to permanent elements like sidebar. Tools sidebar example updated.
new UIX event action. This now allows for a Broker button to wire in a browser event to its action. See updated Automation sidebar and YAML mode complete, also included below for the inclusion of a button to toggle YAML mode. (FYI @Cake1468 - you were asking for this).
Yes, lost of things to address as I worked through examples, specifically how to tie regular actions back to native events. I think we are nearky there - any changes are based on new examples and tweaks needed to Broker to make them as easy as possible to implement.
New rules panel, hash, search. Allows for matching on what the UIX panel variable holds (same panel variable available in templates). Allows for matching based on Browser hash and search string - useful for not running an interaction say if a search string exists as a bail out.
event directive can now target window or document. Default is anchor matching prior 8.2.0-beta.10
Browser realm can now listen to multiple events in the one interaction. Use a list for listen for multiple events.
These came about due to request from @Mariusthvdb to have a full type system log view. See GitHub Discussion where both the System Log link gets “_blank” target as well as tweaks to config/logs.
Directives now have their own rules so a directive can set to only apply if rules match (block does not support rules, use interaction rules).
If you were using uix_update event prior to 8.2.0-beta.11, note that this is now updated to kebab-case uix-update.
With this update, the config/logs example now can include a button on the system->logs link to go straight to a different provider. I really like this solution provding for a 'dedicated` logs tab which is nice and focussed.
… now I think UIX Broker is pretty much a complete tool that can set any sort of UI change. To be able to release 8.2.0 I will not try and add any other UI element other than button but it is plausible that other elements may come, bringing over other other forge sparks as base items.
right so now this is getting better and better, I feel I can safely add the new feature of beta 13 as revolutionary: templates!
and even both Javascript and Jinja
while we got the full log interaction that was announced in beta 10 above, I discussed with Darryn about making that log target dynamic, and use some input_select to set.
best of this is that in day to day operation this all feels so natural, one doesn’t suspect anything custom. (the truth is obvious when looking at that Broker, man the work that got into this is simply amazing)
right.. so, with latest beta 15, I made this, to correct the UI showing Sources on each and every click on More in the History graphs on a more-info dialog.
I truly feel that is a UI design error, allowing my users to go into the realms of entities I dont want them to.
this prevents showing that (I still want to hide the Sources button completely, so half way there)
It opens a /history navigation completely and unchanged, if you happen to have that
another interception I now have is a guard on the Reload All Yaml configurations, I happen to click that accidentally more than I want, and it always breaks the connection