Skip to content

ad-ha/repsolluzygas-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hacs_badge GitHub Release (latest SemVer including pre-releases) GitHub Downloads (all assets, latest release)

HACS Action Validate with hassfest

REPSOL LUZ Y GAS API for Home Assistant

Custom Integration for Home Assistant to connect and display data for Electricity, Gas and SVA Contracts with Repsol Luz y Gas.

This integration is based on the initial integration done by bbzoiro

Description

This integration has been redesigned to implement async methods and to allow the configuration via configflow directly from Home Assistant UI. No need to keep doing configuration in YAML.

This also supports Multi-house and Multi-Contracts.

The current version supports the following:

image

image

Installation

- Manual method

- HACS method (recommended)

  • Copy this repo URL

  • In the HACS section, add this repo as a custom one:

    image

    • On the "Repository" field put the URL copied before
    • On the "Category" select "Integration"
    • Click the "Download" button and download latest version.
  • Restart HA

How to configure

  • Go to Settings > Devices & Services > Add Integration > Repsol Luz y Gas

    image

  • Use your Username and Password

  • Enjoy!

Version History

1.3.1
- Revise SensorDeviceClass for Energy Price and Excedents Prices to currency/kWh so these can be used on the Energy Dashboard
1.3.0
- Adapt the Virtual Battery Sensors to the new scheme from the API
- Rewrite code for sensors and Virtual Battery Data
- Redefine unique_id generation for Virtual Battery Sensors
1.2.2
- Revise latest Virtual Battery Redeemed Sensors
1.2.1
- Add new sensors for ELECTRICITY Contracts:
  - Contract Status
  - Energy Price
  - Power Prices (Punta y Valle)
  - Power
  - Tariff
1.1.1
- Code cleanup
- Update API addresses to newest Repsol releases
- Move several constants to const.py
- Add Virtual Battery Device and Sensors:
  - Current Status (€ and kWh)
  - Last Redeemed Status (€ and kWh)
  - Total kWh Charges/Discharges 
1.0.1
- Code cleanup
- Add SVAs queries from API
- Move headers and other constants to const.py
- Add new SVAs device for each house
- Add SVAs sensors, in preparation for further developments
- Import headers
- Add HOUSES_URL for new SVA sensors
- Preparation for next releases and new contract detail sensors
0.1.4
- Revise logic to segregate data for different Contracts (hopefully it will now work)
- Remove Number of Contracts sensor, as it is now redundant information
0.1.3
- Revise logics to enable CUPS data and Contract Type
- Revise the sensor details to include:
 - Add Device info for each contract, including details on Contract Type and CUPS, plus House ID
 - Use Home Assistant core units (EUR and kWh)
 - Rename sensor to include CUPS
 - Update Unique ID coding
- Revise Config Flow to include CUPS on contract selection.
- Add logic to prevent adding the same contract multiple times.
- Add Spanish translations to Config Flow
- Update English labeling on Config Flow
0.1.1
- Initial Release
- Add Next Invoice Amount Sensor (includes Amount, Variable Amount and Fixed Amount)
- Add ConfigFlow configuration
- Add HACS Custom Repository Configuration
- Revised Average Amount to be pulled from API, instead of calculation
- Implement Unique_Id for each sensor. The sensors are now configurable from UI.

TO-DO

  • Official HACS Release to use without Custom Repositories (currently pending approvals)
  • Add new sensors for Power, Fee, Contract Description
  • Figure out the SVAs information from API (Virtual Battery for PV Contracts and Additional Services)
  • Implement Gas Sensors (if you have this type of contract, please contact me)
  • Check multicontract capabilities, although it should work fine
  • Add Device and append Contract Information (CUPS. House_id, Contract_id, etc..) as additional information
  • Units from Home Assistant instead of fixed ones
  • Address unique-ids for multicontracts, multihouses

Credits

  • bbzoiro - The developer of the base integration

License

This project is licensed under MIT License.

Disclaimer

THIS PROJECT IS NOT IN ANY WAY ASSOCIATED WITH OR RELATED TO THE REPSOL GROUP OF COMPANIES OR ANY OTHER. The information here and online is for educational and resource purposes only and therefore the developers do not endorse or condone any inappropriate use of it, and take no legal responsibility for the functionality or security of your devices.