PiotrMachowski / Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

This custom integration provides a way to present a live view of a map for Xiaomi (Roborock/Viomi/Roidmi/Dreame) vacuums without a need for rooting.
MIT License
1.16k stars 123 forks source link

Notification for Additional Authentication Required #338

Open amaciasf opened 2 years ago

amaciasf commented 2 years ago

Description

When Xiaomi requests additional authentication, you have to go into the logs and look for the URL to authenticate again.

Solution

It would be great to get a notification in Home Assistant when additional authentication is needed so you don't have to go into the logs and look for the URL to authenticate again.

Thank you very much, greetings!

Alternatives

No response

Context

No response

PiotrMachowski commented 2 years ago

That's a good idea 👍

Asiak3 commented 2 years ago

Hi, here is my automation.

alias: Huibuh - Map 2fA
description: ""
trigger:
  - platform: state
    entity_id:
      - camera.huibuh_map
    attribute: url_2fa
    from: "null"
condition:
  - condition: not
    conditions:
      - condition: state
        entity_id: automation.huibuh_map_2fa
        attribute: Url 2fa
        state: "null"
action:
  - service: xiaomi_cloud_map_extractor.reload
    data: {}
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - service: notify.telegram_asiak
    data:
      title: Huibuh map
      message: |-
        Map needs 2fA
        [Link] ( {{ state_attr('camera.huibuh_map', 'url_2fa') }} )
mode: single