zachowj / xfinity-data-usage

Fetch Xfinity data usage and serve it via an HTTP endpoint, publish it to MQTT or post it to an URL.
https://hub.docker.com/r/zachowj/xfinity-data-usage
MIT License
53 stars 15 forks source link

Help using the Home Assistant endpoint #19

Closed jasii closed 3 years ago

jasii commented 3 years ago

Could someone please share how they are using the HA endpoint in their yaml files please.

I just get a string of JSON as the state: {"total_usage":543,"allowable_usage":1229,"home_usage":543,"wifi_usage":0,"courtesy_used":1,"courtesy_remaining":0,"courtesy_allowed":1,"in_paid_overage":true,"remaining_usage":686}

My Home Assistant yaml is like this:

zachowj commented 3 years ago
- platform: rest
  name: Xfinity Internet Usage
  resource: http://192.168.1.XXX:7878/homeassistant
  value_template: "{{ value_json.remaining_usage }}"
  json_attributes:
    - total_usage
    - allowable_usage
    - home_usage
    - wifi_usage
    - courtesy_used
    - courtesy_remaining
    - in_paid_coverage
jasii commented 3 years ago

Thank you