For starters, im very new to the concept of RESTful and im figuring it out as i go along – this topic helped: Adding a Name to a Rest Sensor Prevents Data From Appearing
Currently i get a lot of errors in my logging while attempting to incorporate the following YAML in Configuration.conf
I was hoping someone could come along and point me in the right direction.
I also realize that the Billing total might not be a:
state_class: total_increasing
im not sure what this value should be but the goal right now is to see somthing in the HA Energy Dashboard
rest:
resource: https://utilityapi.com/api/v2/bills?meters=936596
headers:
Authorization: >
Bearer REMOVED
scan_interval: 1200
sensor:
- name: "LADWP UtilityAPI - Base"
device_class: ENERGY
state_class: total_increasing
json_attributes_path: "$.bills[0]"
json_attributes:
- uid
- meter_uid
- authorization_uid
- created
- updated
- notes
- utility
- blocks
- name: "LADWP UtilityAPI - Blocks"
device_class: ENERGY
state_class: total_increasing
json_attributes_path: "$.bills.base[0]"
json_attributes:
- service_identifier
- service_tariff
- service_class
- service_address
- meter_numbers
- billing_contact
- billing_address
- billing_account
- bill_statement_date
- bill_start_date
- bill_end_date
- bill_total_cost
- bill_total_volume
- bill_total_unit
value_template: "{{ value_json['bill_total_volume']['kwh']}}"
unit_of_measurement: kWh
- name: "LADWP UtilityAPI - Line Items"
device_class: ENERGY
state_class: total_increasing
json_attributes_path: "$.bills.lines[0]"
json_attributes:
- name
- start
- end
- cost
- volume
- rate
- unit
- kind
value_template: "{{ value_json['volume']['kwh']}}"
unit_of_measurement: kWh
- name: "LADWP UtilityAPI - Tiers"
device_class: ENERGY
state_class: total_increasing
json_attributes_path: "$.bills.tiers[0]"
json_attributes:
- name
- level
- cost
- volume
- unit
value_template: "{{ value_json['volume']['kwh']}}"
unit_of_measurement: kWh
- name: "LADWP UtilityAPI - ToU"
device_class: ENERGY
state_class: total_increasing
json_attributes_path: "$.bills.time-of-use[0]"
json_attributes:
- name
- bucket
- cost
- volume
- unit
value_template: "{{ value_json['volume']['kwh']}}"
unit_of_measurement: kWh
As far as the error logs go there is so much identifying information in there i’m not sure what’s enough to share with out DOX’ing my self. Therefor i will de-identify with out losing the integrity of the log data.
Update: Log too big for post…