diff --git a/custom_components/repsolluzygas/repsol_api.py b/custom_components/repsolluzygas/repsol_api.py index 3f63261..ac3480b 100644 --- a/custom_components/repsolluzygas/repsol_api.py +++ b/custom_components/repsolluzygas/repsol_api.py @@ -82,6 +82,7 @@ def get_contracts(self, uid, signature, tstamp): response = requests.get('https://areacliente.repsolluzygas.com/api/houses', headers=headers, cookies=self.cookies) data = response.json() + _LOGGER.debug('Contracts Data {}'.format(data)) contracts = {} data = data[0] @@ -93,10 +94,9 @@ def get_contracts(self, uid, signature, tstamp): info['contract_id'] = contract['code'] info['type'] = contract['contractType'] info['active'] = contract['status'] == 'ACTIVE' - info['product_name'] = contract['commercialName'] contracts['information'].append(info) - _LOGGER.debug('Contracts {}'.format(contracts)) + _LOGGER.debug('Contracts Parsed {}'.format(contracts)) return contracts