Comments (7)
Gracias @ad-ha.
Asi que tenga un hueco lo mirare, y intentare crear los sensores de gas.
from repsolluzygas.
Thanks for the comments.
In my case, as I only have one contract (ELECTRICITY) I can't debug or test what is happenning.
I will try to make a workaround to get the proper amount / value.
from repsolluzygas.
Creo que podemos cambiar de Ingles a Spanish :)
Acabo de hacer unos cambios en el código para recuperar apenas los contractos de Electricidad. Arreglaría tu problema.
Al mismo tiempo he aprovechado y he creado los Sensores de Electricidad / Monetarios para que Home Assistant pueda generar estadísticas con los "tipos" correctos.
Finalmente estoy haciendo pruebas para que el componente pueda funcionar con el nuevo modulo "ENERGY" de Home Assistant.
Ahora mismo lo he ejecutado en mi HA y si todo funciona correctamente, hare el release la próxima semana.
from repsolluzygas.
Sí, creo que podemos cambiar. Yo es por la costumbre.
Gracias por revisarlo y los cambios. En el panel de Energía estoy usando la integración que hice para sacar los datos del contador (Iberdrola Distribución).
Para el tema del gas, necesitarías algo de la fuente de la página para hacer el scrapping?
Un saludo
from repsolluzygas.
Necesitaria que pararas tu HomeAssistant y añadas la siguiente entrada en configuration.yaml
logger:
default: debug
Luego puedes postear aquí el log de tu HomeAssistant (/config/logs).
Asi puedo ver como Repsol devuelve los contratos de Gas.
from repsolluzygas.
Buenas,
Te paso lo que me ha salido del log:
2021-12-27 14:54:29 DEBUG (SyncWorker_3) [custom_components.repsolluzygas.repsol_api] Login Data {'callId': '9486b4d579XXXXXXXXXX9e8857e95a', 'errorCode': 0, 'apiVersion': 2, 'statusCode': 200, 'statusReason': 'OK', 'time': '2021-12-27T13:54:29.025Z', 'registeredTimestamp': 1629379889, 'UID': '2bdc44b41ea74XXXX5ec2ca58ee1c', 'UIDSignature': 'UvI0Lk7XXXXXbR4Hlu3nVFdW1s=', 'signatureTimestamp': '1640XX3269', 'created': '2021-08-19T13:31:29.239Z', 'createdTimestamp': 162937XX889, 'isActive': True, 'isRegistered': True, 'isVerified': True, 'lastLogin': '2021-12-27T13:54:28.985Z', 'lastLoginTimestamp': 1640613268, 'lastUpdated': '2021-11-23T09:04:45.685Z', 'lastUpdatedTimestamp': 1637658285685, 'loginProvider': 'site', 'oldestDataUpdated': '2021-08-19T13:31:29.239Z', 'oldestDataUpdatedTimestamp': 1629379889239, 'profile': {'email': '[email protected]'}, 'registered': '2021-08-19T13:31:29.456Z', 'socialProviders': 'site', 'verified': '2021-08-19T13:32:30.062Z', 'verifiedTimestamp': 16293XXX062, 'userInfo': {'UID': '2bdc44b4XXXXXXX5ec2ca58ee1c', 'UIDSig': 'R9f7mRDXXXXXXgUpZ1lHLKaY=', 'UIDSignature': 'UvI0Lk7mN2S73bXXXXXX3nVFdW1s=', 'signatureTimestamp': '1640613269', 'isSiteUser': True, 'isConnected': True, 'isTempUser': False, 'isLoggedIn': True, 'loginProvider': 'site', 'loginProviderUID': '2bdc44b41eXXXXXXXaa0e35ec2ca58ee1c', 'isSiteUID': True, 'identities': [{'provider': 'site', 'providerUID': '2bdc44b41ea74XXXXXXe35ec2ca58ee1c', 'allowsLogin': True, 'isLoginIdentity': True, 'isExpiredSession': False, 'lastUpdated': '2021-12-27T13:54:28.9859475Z', 'lastUpdatedTimestamp': 1640613268985, 'oldestDataUpdated': '2021-08-19T13:31:29.239Z', 'oldestDataUpdatedTimestamp': 1629379889239, 'email': '[email protected]'}], 'email': '[email protected]', 'capabilities': 'None', 'providers': 'site', 'oldestDataUpdatedTimestamp': 1629379889, 'oldestDataAge': 11233380, 'statusReason': 'OK', 'statusCode': 200, 'timestamp': '2021-12-27 13:54:29', 'time': '2021-12-27T13:54:29.018Z', 'errorCode': 0}, 'newUser': False, 'sessionInfo': {'login_token': 'XXXXXXXXXXXXXXX', 'expires_in': '0'}}
2021-12-27 14:54:29 DEBUG (SyncWorker_3) [custom_components.repsolluzygas.repsol_api] Contracts Data [{'code': 'a4j4I000002ZZZZZZZ', 'name': 'XXXX', 'ownerName': 'AXXXXX', 'ownerExtraConditionVersion': 1, 'contracts': [{'id': 'a2F4I000003ZZZZZZ', 'code': '43XXXXX', 'contractType': 'ELECTRICITY', 'cups': 'ES0021000010XXXXXXXXXX', 'address': 'Cl ZZZZZZZZ', 'status': 'ACTIVE', 'role': {'name': 'OWNER', 'commercialName': 'Titular'}, 'permissions': []}, {'id': 'a2F4I00000ZZZZZZZ', 'code': '43XXXXXXX', 'contractType': 'GAS', 'cups': 'ES02341500XXXXXXXXXX', 'address': 'Cl XXXXX', 'status': 'ACTIVE', 'role': {'name': 'OWNER', 'commercialName': 'Titular'}, 'permissions': []}], 'inhabitants': '4', 'houseType': '0', 'residenceType': '0', 'squareMeters': '3', 'constructionYear': '2', 'completedPercentage': '100', 'confirmConstructionYear': False, 'isDefault': True}]
2021-12-27 14:54:29 DEBUG (SyncWorker_3) [custom_components.repsolluzygas.repsol_api] Contracts Parsed {'house_id': 'a4j4I000002ZZZZZZZ', 'number_of_contracts': 2, 'information': [{'contract_id': '43ZZZZZZ', 'type': 'ELECTRICITY', 'active': True}, {'contract_id': '43ZZZZZZ', 'type': 'GAS', 'active': True}]}
2021-12-27 14:54:30 DEBUG (SyncWorker_3) [custom_components.repsolluzygas.repsol_api] Costs Data {'totalDays': 27, 'consumption': 346.36, 'amount': 56.77, 'amountVariable': 36.01, 'amountFixed': 20.76}
2021-12-27 14:54:32 DEBUG (SyncWorker_3) [custom_components.repsolluzygas.repsol_api] Invoices Data [{'idContract': 'a2F4I000003ZZZZZZZ', 'startDate': '20211007', 'endDate': '20211119', 'amount': 121.83, 'debt': 0, 'status': 'PAID', 'invoiceCode': '10GLS0300ZZZZZZ', 'invoiceNumber': '2160035XXXXX', 'subsizedConsumptionAmount': 0, 'subsizedConsumptionPercentage': 0, 'compensationStatus': 'NOT_COMPENSATED'}]
2021-12-27 14:54:32 DEBUG (SyncWorker_3) [custom_components.repsolluzygas.repsol_api] Sensor Data {'consumption': 346.36, 'amount': 56.77, 'amountVariable': 36.01, 'amountFixed': 20.76, 'last_invoice_amount': 121.83, 'last_invoice_paid': True}
2021-12-27 14:54:32 DEBUG (MainThread) [custom_components.repsolluzygas.sensor] Amount has value: 56.77
2021-12-27 14:54:32 DEBUG (MainThread) [custom_components.repsolluzygas.sensor] Last invoice was paid has value: True
Creo que con esto es lo que necesitas.
Un saludo
from repsolluzygas.
Hola, @bzzoiro
Sigues haciendo algo de la integración?
from repsolluzygas.
Related Issues (16)
- Unable to install through HACS HOT 2
- Invoice List HOT 1
- error despues de instalar 2021.12.1 HOT 4
- Adapt sensors to use in HA Energy Module. HOT 1
- Do user & pw have to be into brackets? HOT 11
- Version 1.1. Error in python if you don't have any invoice. HOT 2
- Grahps
- Blocked - Acceso bloqueado HOT 1
- no bills HOT 6
- Error adding entities for domain sensor with platform repsolluzygas HOT 21
- Include Long Term Statistics on sensor.repsol_consumption
- After change contract holder it's not working HOT 1
- Error ¿changes in the api ? HOT 9
- No funciona en HA 2024 HOT 6
- Async and Configflow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repsolluzygas.