Skip to content

Commit

Permalink
fix: fixed indications pushing service not being loaded immediately a…
Browse files Browse the repository at this point in the history
…fter restart

docs: updated README.md with screenshots
  • Loading branch information
alryaz committed Jul 30, 2021
1 parent a146790 commit 166680a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
_ЛК «ТНС Энерго»_ для _Home Assistant_
==================================================

> Предоставление информации о текущем состоянии ваших аккаунтов в ЛК ТНС Энерго.
> Предоставление информации о текущем состоянии ваших лицевых счетов в ЛК ТНС Энерго.
> Передача показаний по счётчикам.
>
>[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/custom-components/hacs)
> [![Лицензия](https://img.shields.io/badge/%D0%9B%D0%B8%D1%86%D0%B5%D0%BD%D0%B7%D0%B8%D1%8F-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
Expand All @@ -10,9 +11,24 @@ _ЛК «ТНС Энерго»_ для _Home Assistant_
>[![Пожертвование Yandex](https://img.shields.io/badge/%D0%9F%D0%BE%D0%B6%D0%B5%D1%80%D1%82%D0%B2%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-Yandex-red.svg)](https://money.yandex.ru/to/410012369233217)
> [![Пожертвование PayPal](https://img.shields.io/badge/%D0%9F%D0%BE%D0%B6%D0%B5%D1%80%D1%82%D0%B2%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5-Paypal-blueviolet.svg)](https://www.paypal.me/alryaz)
## Введение

> @ TODO @
## Скриншоты

<details>
<summary>Информация о лицевом счёте</summary>
<img src="https://raw.githubusercontent.com/alryaz/hass-tns-energo/main/images/account.png" alt="Скриншот: Информация о лицевом счёте">
</details>
<details>
<summary>Последний зарегистрированный платёж</summary>
<img src="https://raw.githubusercontent.com/alryaz/hass-tns-energo/main/images/last_payment.png" alt="Скриншот: Последний зарегистрированный платёж">
</details>
<details>
<summary>Счётчик коммунальных услуг</summary>
<img src="https://raw.githubusercontent.com/alryaz/hass-lkcomu-interrao/main/images/meter.png" alt="Скриншот: Счётчик коммунальных услуг">
</details>
<details>
<summary>Служба отправки показаний</summary>
<img src="https://raw.githubusercontent.com/alryaz/hass-lkcomu-interrao/main/images/push_indications.png" alt="Скриншот: Служба отправки показаний">
</details>

## Установка

Expand Down
5 changes: 4 additions & 1 deletion custom_components/tns_energo/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ def name(self) -> Optional[str]:
async def async_added_to_hass(self) -> None:
_LOGGER.info(self.log_prefix + "Adding to HomeAssistant")
self.updater_restart()
self.register_supported_services()

async def async_will_remove_from_hass(self) -> None:
_LOGGER.info(self.log_prefix + "Removing from HomeAssistant")
Expand Down Expand Up @@ -568,6 +569,8 @@ def register_supported_services(self, for_object: Optional[Any] = None) -> None:

if result:
for service, schema in services.items():
service_name = "async_service_" + service
_LOGGER.debug("Registering service: %s", service_name)
self.platform.async_register_entity_service(
service, schema, "async_service_" + service, features
service, schema, service_name, features
)
Binary file added images/account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/last_payment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/meter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/push_indications.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 166680a

Please sign in to comment.