web: refresh status card on ak-refresh event

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-23 15:04:09 +01:00
parent 0671d712fa
commit 3c2d541d60

View file

@ -16,6 +16,13 @@ export abstract class AdminStatusCard<T> extends AggregateCard {
value?: T;
constructor() {
super();
this.addEventListener("ak-refresh", () => {
this.requestUpdate();
});
}
renderValue(): TemplateResult {
return html`${this.value}`;
}