Accessing the history of an entity

Hello!!!

I am trying to write a custom card. I can access the state of a sensor, but what I want to be able to do is view the history of that sensor and then make calculations with that data. I am writing the card in typescript and using this.hass.states[entity] to access the entity which provides its current value. Could someone please help in how I get access to the history of that entity.

Many thanks
Darren

1 Like

I have the same exact question. Did you ever figure it out?