mirror of
https://github.com/esphome/esphome.git
synced 2024-11-29 02:04:13 +01:00
Fix runtime exception due to dict typing (#2243)
This commit is contained in:
parent
7f76f3726f
commit
4a6f1f150a
1 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
import socket
|
import socket
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
from typing import Optional
|
from typing import Dict, Optional
|
||||||
|
|
||||||
from zeroconf import (
|
from zeroconf import (
|
||||||
_CLASS_IN,
|
_CLASS_IN,
|
||||||
|
@ -64,7 +64,7 @@ class DashboardStatus(RecordUpdateListener, threading.Thread):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
self.zc = zc
|
self.zc = zc
|
||||||
self.query_hosts: set[str] = set()
|
self.query_hosts: set[str] = set()
|
||||||
self.key_to_host: dict[str, str] = {}
|
self.key_to_host: Dict[str, str] = {}
|
||||||
self.stop_event = threading.Event()
|
self.stop_event = threading.Event()
|
||||||
self.query_event = threading.Event()
|
self.query_event = threading.Event()
|
||||||
self.on_update = on_update
|
self.on_update = on_update
|
||||||
|
@ -72,7 +72,7 @@ class DashboardStatus(RecordUpdateListener, threading.Thread):
|
||||||
def update_record(self, zc: Zeroconf, now: float, record: DNSRecord) -> None:
|
def update_record(self, zc: Zeroconf, now: float, record: DNSRecord) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def request_query(self, hosts: dict[str, str]) -> None:
|
def request_query(self, hosts: Dict[str, str]) -> None:
|
||||||
self.query_hosts = set(hosts.values())
|
self.query_hosts = set(hosts.values())
|
||||||
self.key_to_host = hosts
|
self.key_to_host = hosts
|
||||||
self.query_event.set()
|
self.query_event.set()
|
||||||
|
|
Loading…
Reference in a new issue