How to get history data for other sensors?

The integration I am working on - Bayesian - calculates its state from that of other sensors. If I end up developing a config flow for this integration it will be very helpful to calculate some values from the history of other sensors.

Is there an in-built function in home assistant like get_entity_history("entity_id", "start_time, "stop_time") that returns the history of a specified entity over a specified time period.

Looks as if some of these functions may help from homeassistant/components/history but not sure how I would call them from another integration/config flow.

Also looks positive.

As does (but looks like it need wrapping in a scope:

Just import state_changes_during_period from homeassistant.components.
.recorder.history in your config_flow.py and when calling the function pass your hass variable from your integration (with other required params).