resoai / TileBoard

A simple yet highly configurable Dashboard for HomeAssistant
MIT License
1.63k stars 278 forks source link

Events #606

Open alphasixtyfive opened 3 years ago

alphasixtyfive commented 3 years ago

What would you guys think about adding events for various things, like app loaded, tile clicked, page navigated, popup opened/closed etc. This way user could bind to them and do fancy things like playing sounds etc.

rchl commented 3 years ago

I'm not against but maybe the implementation should be driven by specific use-cases as otherwise, it might be hard to judge which events would be useful and which not.

Also, would be enough to just trigger an event with no context information, or each event would have to carry some additional context information like the tile that was clicked or the popup that was opened? It all would have to be defined then.

alphasixtyfive commented 3 years ago

This would indeed be a bit messy and it would be nice to pass the context but... but the sounds! :)

akloeckner commented 3 years ago

Can't we play sounds natively in JS? If so, it could be done by redefining the default actions. A bit messy to configure, I admit...

alphasixtyfive commented 3 years ago

Can't we play sounds natively in JS? If so, it could be done by redefining the default actions. A bit messy to configure, I admit...

Sounds was just the example, having events to subscribe to would be nice to have but certainly not essential.