Samsung Tv hours and minutes in frontend and grafana

I have been looking for a way to see in the frontend how many hours and minutes my tv has the state ‘on’ per day. I found som information here: https://www.home-assistant.io/components/sensor.history_stats/#type but how do I get the info to grafana to show hours and minutes per day in a graph?

This is what I have in my sensors.yaml:

- platform: statistics
  name: Tvn på
  entity_id: media_player.living_room_ue55j5500
  max_age:
    days: 30

in configuration.yaml:

influxdb:
  host: <ip-adress>
  port: 8086
  database: <dbname>
  username: <username>
  password: <password>
  max_retries: 3
  include:
    entities:
       - sensor.koket_utomhus_humidity
       - sensor.koket_utomhus_temperature

I have tried to add the entity for my tv to the influxdb above but all I can see in Grafana is the entity_id and domain. Also I can see temperature and humidity for my sensors. I can´t see for example ‘h’ to use as a value.