TTGO T4 Display - Xbox information

Hi all,

I’ve purchased a LilyGo TTGO display. I want to view the total time that my son is playing on the Xbox per day. I already have a custom apexchart card working based on a created sensor who looks at the history stats of is ‘in game’ time.

xbox_ha_snapshot

I want to display this total time on the TTGO Display so he can look how long he’s playing before I remotely shutdown his Xbox (due to automation). I tried different kind of codes but I just can’t figure out how to get this working. I’m a total n00b when it comes to scripting. The TTGO Display is added to ESPHome and I can edit the code. Can please someone help me how to display this sensor in hours/minutes? Many thanks!

In esphome, set up a home assistant sensor, then display it as usual.