Skip to content

Conversation

@iangregory
Copy link
Contributor

Add error handling for missing or invalid entity_id values in the inverter control methods. The goal is to ensure that attempts to write values or options to an inverter without a valid entity_id are logged as warnings and handled gracefully, preventing crashes.

write_and_poll_switch() already has this check so this makes the code more consistent.

Background: an indentation error in apps.yaml caused my has_target_soc to be set incorrectly, leading to a predbat crash when scheduling an export. This change would prevent the crash and add a useful log to point towards the true issue.

…and_poll_option methods (to align with write_and_poll_switch)
@iangregory iangregory closed this Dec 24, 2025
@iangregory iangregory deleted the fix-crash branch December 24, 2025 10:22
@iangregory iangregory restored the fix-crash branch December 24, 2025 10:26
@iangregory iangregory reopened this Dec 24, 2025
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