Copilot/fix technitiumdns entity error #79
Conversation
Agent-Logs-Url: https://github.com/tamaygz/home-assistant-technitiumdns/sessions/dba0d6ac-f0cc-4e1b-8670-765caac53a5a Co-authored-by: tamaygz <92460164+tamaygz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/tamaygz/home-assistant-technitiumdns/sessions/e7c03f2e-8f8e-4174-99c8-e95417a6cff5 Co-authored-by: tamaygz <92460164+tamaygz@users.noreply.github.com>
…-issue Suppress dynamic DHCP sensor warnings on empty updates
…rror-again Harden DHCP hostname handling for device entities
Atlas Commons PR review
Overall: fail
View PR #79 · |
|
/atlas llm |
|
Running the LLM code review now. |
Atlas Commons code review (LLM)SummaryThis PR hardens hostname handling (string coercion and cached Potential issues
hostname = lease.get("hostName", "")
if not isinstance(hostname, str):
hostname = "" if hostname is None else str(hostname)
# processed_lease still uses lease.host_name / raw value?
if not isinstance(hostname, str):
hostname = "" if hostname is None else str(hostname)
Suggestions
Overall assessmentThe changes address real failure modes (notably Advisory review only — not a merge approval. View PR #79 · |
This pull request improves the robustness and clarity of device hostname handling and logging in both the device tracker and sensor components for TechnitiumDNS. The main changes ensure that hostnames are consistently treated as strings, improve model detection logic, and refine logging for better diagnostics and less noise.
Hostname handling and device model detection:
custom_components/technitiumdns/device_tracker.py,custom_components/technitiumdns/sensor.py) [1] [2] [3] [4]lower()and improving readability. (custom_components/technitiumdns/device_tracker.py,custom_components/technitiumdns/sensor.py) [1] [2]Logging improvements:
custom_components/technitiumdns/device_tracker.py,custom_components/technitiumdns/sensor.py) [1] [2]custom_components/technitiumdns/sensor.py)## SummaryRelated issues