Can you Extract Data from the History Component

There’s a SQL Sensor to fetch data from the history and here is a way using a python script with a command_line sensor.
Maybe you can use it.