Merged
Conversation
Implement scanning and dynamic entity management for learned remote commands. async_scan_remote_commands now reads per-remote storage via platform READERS, diffs against known commands, creates RemoteCommandButton instances for new commands (using stored async_add_entities) and removes deleted commands via the entity registry. Added helper _get_remote_info to resolve platform/device identifiers from registries and switched known_commands to a set. Use async_call_later for scheduled scans and expose async_setup_entry in the button platform to capture the AddEntities callback. Also update config flow to use SelectSelector for multi-select remote_entities, adjust imports, and add/update tests (including new test_init and a button press test) to cover the new behavior.
Add support for IR-specific configuration via Number entities (delay and repeat) and detection/cleanup of new/removed remotes. Introduces a new number platform (number.py) with RemoteCommandNumber and create_ir_number_pair, default IR constants, and wiring in async_setup_entry to forward the NUMBER platform and store async_add_number_entities. Buttons now accept a config_entry_id and include delay_secs/num_repeats from the associated numbers when calling remote.send_command. Adds an entity registry listener that raises a repair issue for newly discovered compatible remotes and cleans up buttons/devices/number entities when a watched remote is removed. Implements helpers (_has_ir_codes, _remove_ir_numbers) and dismisses stale issues when options are updated. Updates config flow to only consider supported reader platforms, adds README and translation strings for the new repair issue, and includes comprehensive tests for button, init, and number behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SelectSelector(replacesvol.Coerce(list)which broke frontend serialization) and modernizeOptionsFlowto use the base classconfig_entrypropertybrand/folder withmdi:remoteicon for HA 2026.3+ local brand image supportKey changes
__init__.py:async_scan_remote_commands()resolves entity→device→storage key via registries, reads commands per remote, set-diffs to create/remove buttons._make_service_listener()schedules delayed re-scans onlearn_command/delete_commandeventsbutton.py: Addedasync_setup_entryto storeasync_add_entitiescallback for dynamic entity creationconfig_flow.py:SelectSelectorwithmultiple=Truefor remote entity selection; removedOptionsFlow.__init__(uses inheritedconfig_entryproperty)brand/:icon.png(256px) andicon@2x.png(512px), transparent backgroundTest plan