Comcast/Xfinity Data Usage Sensor

I managed to get the my Xfinity data usage into Home Assistant through a roundabout way.

  1. I’m using this Docker image to pull my Xfinity usage into InfluxDB.
  2. I then setup an InfluxDB sensor in HomeAssistant to pull the values in.

I set this up today and it seems to be working well. It would be nicer if we had a direct integration into Home Assistant, but this will do for now.

If anyone goes this route, here is my InfluxDB sensor configuration:

- platform: influxdb
  host: !secret influxdb_host
  username: !secret influxdb_user
  password: !secret influxdb_pass
  queries:
    - name: xfinity_data_used
      database: xfinity
      field: used
      group_function: last
      where: "time > now() - 7d"
      measurement: '"comcast_data_usage"'
      unit_of_measurement: "GB"

    - name: xfinity_data_total
      database: xfinity
      field: total
      group_function: last
      where: "time > now() - 7d"
      measurement: '"comcast_data_usage"'
      unit_of_measurement: "GB"
1 Like