Skip to content

chore: disable config entities by default - #24

Merged
gabe565 merged 1 commit into
mainfrom
default-disable-config-entities
May 16, 2026
Merged

gabe565 merged 1 commit into
mainfrom
default-disable-config-entities

Conversation

@gabe565

@gabe565 gabe565 commented May 16, 2026 •

Copy link
Copy Markdown
Member

By default, TronbytAssistant creates too many entities. This PR disables config entities by default: skip_display_version, ap_mode, prefer_ipv6, swap_colors, ssid, image_url, hostname, sntp_server, syslog_addr, wifi_power_save.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request disables several configuration entities by default across the select, switch, and text platforms by setting entity_registry_enabled_default to False. The reviewer suggests improving code maintainability by setting this default value directly in the dataclass definitions instead of repeating it for each entity. Additionally, the feedback points out several entities that appear to have been missed, such as update_interval, night_mode_app, pinned_app, and TronbytNightModeSwitch, which should also be disabled to ensure consistency with the intended changes.

icon="mdi:wifi",
value_fn=lambda device: (device.get("info") or {}).get("ssid"),
patch_key="ssid",
entity_registry_enabled_default=False,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since all entities in TEXT_DESCRIPTIONS are being disabled, it would be cleaner to change the default value of entity_registry_enabled_default to False in the TronbytTextDescription dataclass (line 24) and remove the explicit assignments from the individual descriptions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. I'm going to prefer being explicit here.

@gabe565
gabe565 merged commit 0112a81 into main May 16, 2026
5 checks passed
@gabe565
gabe565 deleted the default-disable-config-entities branch May 16, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant