Graph with variable "Hours to Show"

Is there a way that the history graph can handle a variable “hours_to_show”?

Right now I have multiple graphs from 8 to 168 hours, but it would be nice if I can give an input and that input is used for the graph.

- type: history-graph
    title: Temperature X hour
    hours_to_show: 8 **<-- This variable**