Mam problem z eWeLink Smart Home. Mam go w dodatkach. W zasadzie wszystko poprawnie działa. Obsługuje dwie bramki RF/IR i dalej steruje telewizorem, roletami, zarówno tymi na IR jak i na RF 433MHz.
Jest jednak pewien problem. Co kilkanaście dni wyłącza się dodatek i piloty nie działają. Wchodzę wtedy w Ustawienia/dodatki i na eWeLink Smart Home. Jest wyłączony mimo włączenia “obserwatora”. Nie mam pojęcia o co tu chodzi. Oczywiście pomaga też restart Raspberry PY.
Patrzyłem w logach i zastanowiły mnie dziwne ostrzeżenia. W loga jest pełno śmieci. Jedne dotyczą urządzenia 65PUS7956/12. To jest telewizor Samsunga, który HA sam zainstalował i nie używam tej integracji. Drugie to jakieś SMART.IPCAMERA. Też nie używam tego. Przez chwilę miałem podgląd w HA na kilkanaście kamer, ale chodziło to tak fatalnie (poklatkowy obraz i duże opóźnienie w stosunku do rzeczywistego obrazu), że nie używam tego. Może to pozostałość po tamtym.
Może ktoś miał podobne problemy z eWelink? teraz chciałbym zacząć od usunięcia tych niepotrzebnych urządzeń. Jak mam się to tego zabrać. Proszę o podpowiedzi.
Poniżej kilka zrzutów ekranu.
Chodzi o to, że Dodatek się wywraca, watchdog go restartuje, ale Supervisor obserwuje i widzi, że się wywraca cyklicznie, więc po którymś razie Supervisor blokuje watchdoga i zabija Dodatek na stałe.
Zgłoś issue do Dodatku, aby pracował stabilnie (a może trzeba popracować nad konfiguracją?)
oraz ewentualnie do Supervisora by można było robić wyjątki od tego zachowania…
Dzięki @szopen. Przynajmniej wiem, w jakim iść kierunku. Tak przy okazji udało mi się wyłączyć nieużywaną integrację z telewizorem. Teraz w logu mam połowę mniej komunikatów o braku połączenia. Zupełnie jednak nie mogę znaleźć tej camery ip. Gdzie może siedzieć ta SMART.IPCAMERA? Są w szegółach loga takie informacje jak poniżej.
Pliki w formacie tekstowym poniżej. Niestety nigdzie nie ma tego SMART.IPCAMERA.
Nawet zacząłem szukać przez consolę i polecenia find i gerp.
W configuration.yaml właściwie nic nie ma.
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
----------------------------------------------------
automations.yaml wygląda tak
-------------------------------------------------------
- id: '1716148960361'
alias: W łóżeczku
description: Zapala lampki boczne, gasi górne światło, wyłącza na listwie inne gniazda
trigger:
- platform: state
entity_id:
- binary_sensor.1002051042_50c0029c07da42b558
to: 'on'
- platform: state
entity_id:
- binary_sensor.1002051042_393a01d405688ad698
to: 'on'
condition:
- condition: device
type: is_off
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: 9ec2a1cf62619b7bd857a00fc2595eef
domain: switch
action:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.w_lozeczku
mode: single
- id: '1716149322109'
alias: Górne światło
description: Załącza górną lampę. Wyłącza listwę i lampki boczne.
trigger:
- platform: state
entity_id:
- binary_sensor.1002051042_393a01d205688ad694
to: 'on'
condition:
- condition: device
type: is_off
device_id: 7a1ea5b1707f718b9d74b8806f088bf4
entity_id: 4269711ce43bac756f94fbd9c2cbb4d3
domain: switch
action:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.gorne
mode: single
- id: '1716759234642'
alias: Auto ściemnianie lampy
description: ''
triggers:
- type: turned_on
device_id: 7a1ea5b1707f718b9d74b8806f088bf4
entity_id: 4269711ce43bac756f94fbd9c2cbb4d3
domain: switch
trigger: device
conditions: []
actions:
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilot lampy
command: Dark
target:
entity_id:
- remote.bramka_ir_rf_pokoj_mf
action: remote.send_command
mode: single
- id: '1717923635811'
alias: Volum- TV
description: ''
triggers:
- entity_id:
- binary_sensor.1002050f1a_4f90029207bec99258
to: 'on'
trigger: state
conditions: []
actions:
- metadata: {}
data: {}
action: script.pilot_tv_volumeminus
mode: single
- id: '1718204078572'
alias: SALON Żaluzje down
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_394201d8056c8ad693
to: 'on'
trigger: state
- entity_id:
- scene.salondown
to:
trigger: state
- entity_id:
- binary_sensor.1002051042_397801e4055cdefa0c
to: 'on'
trigger: state
- entity_id:
- binary_sensor.1002050f1a_3a7a01e0058ae6de5c
to: 'on'
trigger: state
conditions: []
actions:
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilot SALON
command: Down
target:
entity_id:
- remote.bramk_ir_rf_salon
action: remote.send_command
- device_id: 311707770b73505c6efbeeee2f22a0b9
domain: cover
entity_id: 85fb0c990dfa13bd6691f58429645796
type: open
mode: single
- id: '1718204157142'
alias: SALON Żaluzje up
description: ''
triggers:
- entity_id:
- scene.salonup
to:
trigger: state
- entity_id:
- binary_sensor.1002051042_390a01ee0554defa08
to: 'on'
trigger: state
- entity_id:
- binary_sensor.1002050f1a_32ba01e20588e6de58
to: 'on'
trigger: state
conditions: []
actions:
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilot SALON
command: Up
target:
entity_id:
- remote.bramk_ir_rf_salon
action: remote.send_command
- device_id: 311707770b73505c6efbeeee2f22a0b9
domain: cover
entity_id: 85fb0c990dfa13bd6691f58429645796
type: close
mode: single
- id: '1718207501625'
alias: Lamki off
description: Zapala lampki boczne, gasi górne światło, wyłącza na listwie inne gniazda
trigger:
- platform: state
entity_id:
- binary_sensor.1002051042_50c0029c07da42b558
to: 'on'
- platform: state
entity_id:
- binary_sensor.1002051042_393a01d405688ad698
to: 'on'
condition:
- condition: device
type: is_on
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: 9ec2a1cf62619b7bd857a00fc2595eef
domain: switch
action:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.lampki_off
mode: single
- id: '1718207715368'
alias: Zasilanie ON
description: Zapala lampki boczne, gasi górne światło, wyłącza na listwie inne gniazda
trigger:
- platform: state
entity_id:
- binary_sensor.1002051042_393401d4056a8ad699
to: 'on'
condition:
- condition: device
type: is_off
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: 67736ccd70080ecb453f0001c5ae5921
domain: switch
action:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.zasilanie
mode: single
- id: '1718209221791'
alias: Zasilanie off
description: Zapala lampki boczne, gasi górne światło, wyłącza na listwie inne gniazda
trigger:
- platform: state
entity_id:
- binary_sensor.1002051042_393401d4056a8ad699
to: 'on'
condition:
- condition: device
type: is_on
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: 67736ccd70080ecb453f0001c5ae5921
domain: switch
action:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.zasilanie_off
mode: single
- id: '1718209431631'
alias: Dobranoc 2
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.1002051042_315001d405668ad69c
to: 'on'
condition:
- condition: device
type: is_on
device_id: 7a1ea5b1707f718b9d74b8806f088bf4
entity_id: 4269711ce43bac756f94fbd9c2cbb4d3
domain: switch
action:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.dobranoc
mode: single
- id: '1718209472741'
alias: Dobranoc 3
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.1002051042_315001d405668ad69c
to: 'on'
condition:
- condition: device
type: is_on
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: da0aca803ee4f1db8477608f25b916e6
domain: switch
action:
- service: scene.turn_on
metadata: {}
target:
entity_id: scene.dobranoc
mode: single
- id: '1718212266051'
alias: MF Żaluzje Down
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_393201d605668ad691
to: 'on'
trigger: state
- entity_id:
- input_button.zaluzje_mf_down
to:
trigger: state
conditions: []
actions:
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilotzaluzjiprawej
command: Down
target:
entity_id:
- remote.bramka_ir_rf_pokoj_mf
action: remote.send_command
- metadata: {}
data:
num_repeats: 1
delay_secs: 0
hold_secs: 0
device: Pilot żaluzji lewej
command: Down
target:
entity_id:
- remote.bramka_ir_rf_pokoj_mf
action: remote.send_command
- delay:
hours: 0
minutes: 0
seconds: 16
milliseconds: 0
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilot żaluzji lewej
command: Stop
target:
entity_id:
- remote.bramka_ir_rf_pokoj_mf
action: remote.send_command
mode: single
- id: '1718212671101'
alias: MF żaluzje Up
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_394601d605688ad692
to: 'on'
trigger: state
- entity_id:
- input_button.zaluzje_mf_up
to:
trigger: state
conditions: []
actions:
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilotzaluzjiprawej
command: Up
target:
entity_id:
- remote.bramka_ir_rf_pokoj_mf
action: remote.send_command
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilot żaluzji lewej
command: Up
target:
entity_id:
- remote.bramka_ir_rf_pokoj_mf
action: remote.send_command
mode: single
- id: '1718224705541'
alias: Górne FULL
description: Załącza górną lampę. Wyłącza listwę i lampki boczne.
triggers:
- entity_id:
- binary_sensor.1002051042_393a01d205688ad694
to: 'on'
trigger: state
conditions:
- condition: device
type: is_on
device_id: 7a1ea5b1707f718b9d74b8806f088bf4
entity_id: 4269711ce43bac756f94fbd9c2cbb4d3
domain: switch
actions:
- metadata: {}
data:
num_repeats: 10
delay_secs: 0.4
hold_secs: 0
device: Pilot lampy
command: Light+
target:
entity_id:
- remote.bramka_ir_rf_pokoj_mf
action: remote.send_command
mode: single
- id: '1721548054435'
alias: Wyłącza ładowarkę bezprzewdową przy 85% naładowania
description: ''
triggers:
- trigger: state
entity_id:
- sensor.motorola_edge_30_neo_battery_state
conditions:
- condition: state
entity_id: sensor.motorola_edge_30_neo_battery_level
for:
hours: 0
minutes: 0
seconds: 10
state: '>85'
actions:
- type: turn_off
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: 67736ccd70080ecb453f0001c5ae5921
domain: switch
- type: turn_off
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: 996f0035de7eceb1bbb4ec5162b33568
domain: switch
mode: single
- id: '1721548282429'
alias: Przełączenie nawilżacza na 1 bieg
description: ''
trigger:
- platform: device
device_id: 0f152144119d5fe28d083904ad081959
domain: device_tracker
entity_id: 82c0fac635340f858323f70217169a58
type: leaves
zone: zone.home
condition: []
action:
- service: notify.mobile_app_motorola_edge_30_neo
metadata: {}
data:
title: Nawilżacz
message: Przełączenie na 1 bieg
- type: toggle
device_id: 14db1b91ac1ba5a041d4cc137024ea53
entity_id: 4a1d95fe4909c647738c9e3e8299c876
domain: switch
mode: single
- id: '1721548407724'
alias: Przełączenie nawilżacza na 3 bieg
description: ''
trigger:
- platform: device
device_id: 0f152144119d5fe28d083904ad081959
domain: device_tracker
entity_id: 82c0fac635340f858323f70217169a58
type: enters
zone: zone.home
condition: []
action:
- service: notify.mobile_app_motorola_edge_30_neo
metadata: {}
data:
message: Przełączenie na 3 bieg
title: Nawilżacz
- type: toggle
device_id: 14db1b91ac1ba5a041d4cc137024ea53
entity_id: 4a1d95fe4909c647738c9e3e8299c876
domain: switch
- delay:
hours: 0
minutes: 0
seconds: 20
milliseconds: 0
- type: toggle
device_id: 14db1b91ac1ba5a041d4cc137024ea53
entity_id: 4a1d95fe4909c647738c9e3e8299c876
domain: switch
mode: single
- id: '1721596500120'
alias: Koniec prania
description: ''
use_blueprint:
path: Blackshome/appliance-notifications.yaml
input:
power_sensor: sensor.pralka_current_consumption
start_appliance_power: 3
start_time_delay: 5
end_appliance_power: 3
end_time_delay: 5
end_notify_device:
- 0f152144119d5fe28d083904ad081959
end_message: Pranie zakończone
end_message_title: PRALKA
running_dead_zone: 10
start_notify_device:
- 0f152144119d5fe28d083904ad081959
include_end_notify: enable_end_notify_options
include_duration_tracking: disable_duration_tracking
include_start_notify: disable_start_notify_options
start_title: PRALKA
start_message: Pranie rozpoczęte
- id: '1721763342671'
alias: Wyłącza zasilacz po przekroczeniu poziomu 80% naładowania
description: ''
triggers:
- trigger: state
entity_id:
- sensor.motorola_edge_30_neo_battery_state
conditions:
- condition: state
entity_id: sensor.motorola_edge_30_neo_battery_level
state: '>80'
for:
hours: 0
minutes: 0
seconds: 10
actions:
- type: turn_off
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: 67736ccd70080ecb453f0001c5ae5921
domain: switch
- type: turn_off
device_id: c73c3af919c6f1dd6b310090d49c1817
entity_id: 996f0035de7eceb1bbb4ec5162b33568
domain: switch
mode: single
- id: '1722627261059'
alias: Zmywarka
description: ''
use_blueprint:
path: Blackshome/appliance-notifications.yaml
input:
power_sensor: sensor.zmywarka_current_consumption
start_appliance_power: 3
start_time_delay: 5
end_appliance_power: 2
end_time_delay: 5
end_notify_device:
- 0f152144119d5fe28d083904ad081959
end_message: Zmywanie zakończone
end_message_title: ZMYWARKA
running_dead_zone: 10
start_notify_device:
- 0f152144119d5fe28d083904ad081959
include_end_notify: enable_end_notify_options
include_duration_tracking: disable_duration_tracking
include_start_notify: disable_start_notify_options
start_title: ZMYWARKA
start_message: Zmywanie rozpoczęte
- id: '1727887735538'
alias: Salon pilot lewa żaluzja up
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_398201da0566defa04
to: 'on'
trigger: state
- entity_id:
- binary_sensor.1002050f1a_3a7a01e0058ce6de54
to: 'on'
trigger: state
conditions: []
actions:
- device_id: 311707770b73505c6efbeeee2f22a0b9
domain: cover
entity_id: 85fb0c990dfa13bd6691f58429645796
type: close
mode: single
- id: '1727888708281'
alias: Salon pilot lewa żaluzja down
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_397c01da056adefa01
to: 'on'
trigger: state
- entity_id:
- binary_sensor.1002050f1a_32c401e20588e6de51
to: 'on'
trigger: state
conditions: []
actions:
- device_id: 311707770b73505c6efbeeee2f22a0b9
domain: cover
entity_id: 85fb0c990dfa13bd6691f58429645796
type: open
mode: single
- id: '1727889105625'
alias: Salon pilot lewa żaluzja stop
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_396601d80568defa02
to: 'on'
trigger: state
- entity_id:
- binary_sensor.1002050f1a_32ee01de058ce6de52
to: 'on'
trigger: state
conditions: []
actions:
- device_id: 311707770b73505c6efbeeee2f22a0b9
domain: cover
entity_id: 85fb0c990dfa13bd6691f58429645796
type: stop
mode: single
- id: '1727889379772'
alias: Salon pilot prawa żaluzja Up
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_395a01e00562defa09
to: 'on'
trigger: state
- entity_id:
- binary_sensor.1002050f1a_3a7001e20588e6de59
to: 'on'
trigger: state
conditions: []
actions:
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilot SALON
command: Up
target:
entity_id:
- remote.bramk_ir_rf_salon
action: remote.send_command
mode: single
- id: '1727889478776'
alias: Salon pilot prawa żaluzja stop
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_395e01d6056cdefa05
to: 'on'
trigger: state
- entity_id:
- binary_sensor.1002050f1a_3a8c01de058ee6de55
to: 'on'
trigger: state
conditions: []
actions:
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilot SALON
command: Stop
target:
entity_id:
- remote.bramk_ir_rf_salon
action: remote.send_command
mode: single
- id: '1727889533702'
alias: Salon pilot prawa żaluzja down
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_397801da056cdefa03
to: 'on'
trigger: state
- entity_id:
- binary_sensor.1002050f1a_3a8e01de058ce6de53
to: 'on'
trigger: state
conditions: []
actions:
- metadata: {}
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
device: Pilot SALON
command: Down
target:
entity_id:
- remote.bramk_ir_rf_salon
action: remote.send_command
mode: single
- id: '1731166166369'
alias: Wyłączanie ładowania USB przy 87%
description: ''
use_blueprint:
path: vorion/turn-off-phone-charging-after-the-phone-is-charged.yaml
input:
switch: switch.biurko_listwa_socket_5
charged_percent: 87
phone_battery: sensor.motorola_edge_30_neo_battery_level
- id: '1731166655726'
alias: Wyłączenie ładowania gniazda 4 przy 82%
description: ''
use_blueprint:
path: vorion/turn-off-phone-charging-after-the-phone-is-charged.yaml
input:
switch: switch.biurko_listwa_socket_4
charged_percent: 82
phone_battery: sensor.motorola_edge_30_neo_battery_level
- id: '1731166731218'
alias: Wyłącznie ładowania ładowania 3 przy 82%
description: ''
use_blueprint:
path: vorion/turn-off-phone-charging-after-the-phone-is-charged.yaml
input:
switch: switch.biurko_listwa_socket_3
charged_percent: 82
phone_battery: sensor.motorola_edge_30_neo_battery_level
- id: '1731338740271'
alias: Żaluzje zewnętrzne MF down
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_394201d8056c8ad693
to: 'on'
trigger: state
conditions: []
actions:
- action: scene.turn_on
metadata: {}
target:
entity_id: scene.rolety_mf_down_on
- action: scene.turn_on
metadata: {}
target:
entity_id: scene.rolety_mf_down_off
mode: single
- id: '1731339525392'
alias: Żaluzje zewnętrzne MF up
description: ''
triggers:
- entity_id:
- binary_sensor.1002051042_314201d6056a8ad695
to: 'on'
trigger: state
conditions: []
actions:
- action: scene.turn_on
metadata: {}
target:
entity_id: scene.rolety_mf_up_on
- action: scene.turn_on
metadata: {}
target:
entity_id: scene.rolety_mf_up_off
mode: single
Oto plik z Hacsa - config_flow.py
“”“Adds config flow for HACS.”“”
from future import annotations
import asyncio
from contextlib import suppress
from typing import TYPE_CHECKING
from aiogithubapi import (
GitHubDeviceAPI,
GitHubException,
GitHubLoginDeviceModel,
GitHubLoginOauthModel,
)
from aiogithubapi.common.const import OAUTH_USER_LOGIN
from awesomeversion import AwesomeVersion
from homeassistant.config_entries import ConfigFlow, OptionsFlow
from homeassistant.const import version as HAVERSION
from homeassistant.core import callback
from homeassistant.data_entry_flow import UnknownFlow
from homeassistant.helpers import aiohttp_client
from homeassistant.loader import async_get_integration
import voluptuous as vol
from .base import HacsBase
from .const import CLIENT_ID, DOMAIN, LOCALE, MINIMUM_HA_VERSION
from .utils.configuration_schema import (
APPDAEMON,
COUNTRY,
SIDEPANEL_ICON,
SIDEPANEL_TITLE,
)
from .utils.logger import LOGGER
if TYPE_CHECKING:
from homeassistant.core import HomeAssistant
class HacsFlowHandler(ConfigFlow, domain=DOMAIN):
“”“Config flow for HACS.”“”
VERSION = 1
hass: HomeAssistant
activation_task: asyncio.Task | None = None
device: GitHubDeviceAPI | None = None
_registration: GitHubLoginDeviceModel | None = None
_activation: GitHubLoginOauthModel | None = None
_reauth: bool = False
def __init__(self) -> None:
"""Initialize."""
self._errors = {}
self._user_input = {}
async def async_step_user(self, user_input):
"""Handle a flow initialized by the user."""
self._errors = {}
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
if self.hass.data.get(DOMAIN):
return self.async_abort(reason="single_instance_allowed")
if user_input:
if [x for x in user_input if x.startswith("acc_") and not user_input[x]]:
self._errors["base"] = "acc"
return await self._show_config_form(user_input)
self._user_input = user_input
return await self.async_step_device(user_input)
# Initial form
return await self._show_config_form(user_input)
async def async_step_device(self, _user_input):
"""Handle device steps."""
async def _wait_for_activation() -> None:
try:
response = await self.device.activation(device_code=self._registration.device_code)
self._activation = response.data
finally:
async def _progress():
with suppress(UnknownFlow):
await self.hass.config_entries.flow.async_configure(flow_id=self.flow_id)
if not self.device:
integration = await async_get_integration(self.hass, DOMAIN)
self.device = GitHubDeviceAPI(
client_id=CLIENT_ID,
session=aiohttp_client.async_get_clientsession(self.hass),
**{"client_name": f"HACS/{integration.version}"},
)
try:
response = await self.device.register()
self._registration = response.data
except GitHubException as exception:
LOGGER.exception(exception)
return self.async_abort(reason="could_not_register")
if self.activation_task is None:
self.activation_task = self.hass.async_create_task(_wait_for_activation())
if self.activation_task.done():
if (exception := self.activation_task.exception()) is not None:
LOGGER.exception(exception)
return self.async_show_progress_done(next_step_id="could_not_register")
return self.async_show_progress_done(next_step_id="device_done")
show_progress_kwargs = {
"step_id": "device",
"progress_action": "wait_for_device",
"description_placeholders": {
"url": OAUTH_USER_LOGIN,
"code": self._registration.user_code,
},
"progress_task": self.activation_task,
}
return self.async_show_progress(**show_progress_kwargs)
async def _show_config_form(self, user_input):
"""Show the configuration form to edit location data."""
if not user_input:
user_input = {}
if AwesomeVersion(HAVERSION) < MINIMUM_HA_VERSION:
return self.async_abort(
reason="min_ha_version",
description_placeholders={"version": MINIMUM_HA_VERSION},
)
return self.async_show_form(
step_id="user",
data_schema=vol.Schema(
{
vol.Required("acc_logs", default=user_input.get("acc_logs", False)): bool,
vol.Required("acc_addons", default=user_input.get("acc_addons", False)): bool,
vol.Required(
"acc_untested", default=user_input.get("acc_untested", False)
): bool,
vol.Required("acc_disable", default=user_input.get("acc_disable", False)): bool,
}
),
errors=self._errors,
)
async def async_step_device_done(self, user_input: dict[str, bool] | None = None):
"""Handle device steps"""
if self._reauth:
existing_entry = self.hass.config_entries.async_get_entry(self.context["entry_id"])
self.hass.config_entries.async_update_entry(
existing_entry, data={**existing_entry.data, "token": self._activation.access_token}
)
await self.hass.config_entries.async_reload(existing_entry.entry_id)
return self.async_abort(reason="reauth_successful")
return self.async_create_entry(
title="",
data={
"token": self._activation.access_token,
},
options={
"experimental": True,
},
)
async def async_step_could_not_register(self, _user_input=None):
"""Handle issues that need transition await from progress step."""
return self.async_abort(reason="could_not_register")
async def async_step_reauth(self, _user_input=None):
"""Perform reauth upon an API authentication error."""
return await self.async_step_reauth_confirm()
async def async_step_reauth_confirm(self, user_input=None):
"""Dialog that informs the user that reauth is required."""
if user_input is None:
return self.async_show_form(
step_id="reauth_confirm",
data_schema=vol.Schema({}),
)
self._reauth = True
return await self.async_step_device(None)
@staticmethod
@callback
def async_get_options_flow(config_entry):
return HacsOptionsFlowHandler(config_entry)
class HacsOptionsFlowHandler(OptionsFlow):
“”“HACS config flow options handler.”“”
def __init__(self, config_entry):
"""Initialize HACS options flow."""
self.config_entry = config_entry
async def async_step_init(self, _user_input=None):
"""Manage the options."""
return await self.async_step_user()
async def async_step_user(self, user_input=None):
"""Handle a flow initialized by the user."""
hacs: HacsBase = self.hass.data.get(DOMAIN)
if user_input is not None:
return self.async_create_entry(title="", data={**user_input, "experimental": True})
if hacs is None or hacs.configuration is None:
return self.async_abort(reason="not_setup")
if hacs.queue.has_pending_tasks:
return self.async_abort(reason="pending_tasks")
schema = {
vol.Optional(SIDEPANEL_TITLE, default=hacs.configuration.sidepanel_title): str,
vol.Optional(SIDEPANEL_ICON, default=hacs.configuration.sidepanel_icon): str,
vol.Optional(COUNTRY, default=hacs.configuration.country): vol.In(LOCALE),
vol.Optional(APPDAEMON, default=hacs.configuration.appdaemon): bool,
}
return self.async_show_form(step_id="user", data_schema=vol.Schema(schema))
Tak, zgadza się. W HA jest integracja Tp-link, ale nie ma tam kamer. Ale istotnie w aplikacji Tapo w telefonie mam kamery. Nie wiem skąd ta nazwa aplikacji Kasa. Takiej nie mam.
Home Assistant automatycznie skanuje sieć w poszukiwaniu kompatybilnych urządzeń TP-Link.
Kamery Tapo (mimo że są z innego ekosystemu) mogą być częściowo wykrywane, ale nie są w pełni obsługiwane przez tę integrację, co generuje błędy w logach
Oznacza, że ostrzeżenia takie jak te związane z kasa.discover nie będą wyświetlane w logach.
/
Czyli będą wyświetlane jedynie błędy i krytyczne a ostrzeżenie nie.