Provide information about current state of your Mosoblgaz contracts.
This custom component provides Mosoblgaz API polling capabilities to HomeAssistant.
- Open HACS (via
Extensions
in the sidebar) - Add a new custom repository:
- Select
Integration
as custom repository type - Enter custom repository URL:
https://github.com/alryaz/hass-mosoblgaz
- Press
Add
button - Wait until repository gets added
- You should now see
Mosoblgaz (Мособлгаз)
integration available in the list of newly added integrations
- Select
- Click
Install
button to view available versions - Install latest version by pressing
Install
NOTE: It is not recommended to install master
branch. It is intended for development only.
Clone the repository to a temporary directory, then create a custom_components
directory inside your HomeAssistant
config folder (if it doesn't exist yet). Then, move Mosoblgaz
folder from custom_components
folder of
the repository to the custom_components
folder inside your HomeAssistant configuration.
An example (assuming HomeAssistant configuration is available at /mnt/homeassistant/config
) for Unix-based
systems is available below:
git clone https://github.com/alryaz/hass-mosoblgaz.git hass-mosoblgaz
mkdir -p /mnt/homeassistant/config/custom_components
mv hass-mosoblgaz/custom_components/mosoblgaz /mnt/homeassistant/config/custom_components
mosoblgaz:
username: !secret mosoblgaz_username
password: !secret mosoblgaz_password
mosoblgaz:
# First user
- username: !secret first_mosoblgaz_username
password: !secret first_mosoblgaz_password
# Second user
- username: !secret second_mosoblgaz_username
password: !secret second_mosoblgaz_password
# Third user
- username: !secret third_mosoblgaz_username
password: !secret third_mosoblgaz_password
mosoblgaz:
...
contracts:
# Update every part of the contract (including meters, invoices, and what's to come)
135112512: True
# Disable contract completely
5612341421: False
# Add only account and invoice sensors, but not meters.
512124124:
invoices: True
meters: False
Default scan_interval
: 1 hour
mosoblgaz:
...
# Interval for entity updates
scan_interval:
hours: 6
# ... also possible to set via seconds
scan_interval: 21600
Currently, naming entities supports basic formatting based on python str.format(...)
method. Changing
these parameters (assuming setup without explicit overrides via Customize interface or alike) will have effect both on entity IDs and friendly names.
Supported replacements are: code
, group
(only for invoices)
Default contract_name
: MOG Contract {code}
(ex.: MOG Contract 214651241
)
Default meter_name
: MOG Meter {code}
(ex. MOG Meter 214651241
)
Default invoice_name
: MES {group} Invoice {code}
(ex. MOG Gas Invoice 214651241
)
mosoblgaz:
...
# Custom contract name format
contract_name: 'My super {code} contract'
# Custom meter name format
meter_name: 'Ultimate {code} gasification'
# Custom invoice name format
invoice_name: 'What {group} costs on {code}'
By default, invoice entities display overpayment in positive. If you would like it to show up another way (to display
amount left to pay in positive), supply an invert_invoice
key with true
as value to your configuration:
mosoblgaz:
...
# Invert invoice values
invert_invoices: true