Add player join/leave events to Satisfactory integration#3
Merged
Programmer-Timmy merged 11 commits intomainfrom Mar 4, 2026
Merged
Add player join/leave events to Satisfactory integration#3Programmer-Timmy merged 11 commits intomainfrom
Programmer-Timmy merged 11 commits intomainfrom
Conversation
This update introduces events for when players join or leave the Satisfactory server. The events are fired on state changes, allowing users to create automations based on player activity. Additionally, the SatisfactoryCoordinator now accepts an entry_id to identify server instances.
This update introduces a new event platform for tracking player join and leave events in the Satisfactory integration. It modifies the coordinator to manage player activity and updates the configuration to support these events, enhancing the overall functionality of the integration.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Home Assistant event platform to the Satisfactory integration so automations can react when connected player count changes (join/leave), plus corresponding tests and localization/docs updates.
Changes:
- Introduces
SatisfactoryPlayerActivityEventEntitythat fires join/leave events on coordinator updates. - Registers the new
eventplatform and adds translations/strings for the event entity. - Documents the new events in the README and adds unit tests for event firing behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
custom_components/satisfactory/event.py |
Adds the event entity and coordinator-update logic that triggers join/leave events. |
custom_components/satisfactory/__init__.py |
Registers Platform.EVENT so the new platform is set up. |
custom_components/satisfactory/strings.json |
Adds base strings for the new event entity and event type labels. |
custom_components/satisfactory/translations/en.json |
Adds English translations for the new event entity and event type labels. |
tests/satisfactory/test_event.py |
Adds tests validating join/leave events fire only on player-count changes. |
README.md |
Documents supported events and adds the “Server health” sensor row. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
@Programmer-Timmy I've opened a new pull request, #4, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ation Co-authored-by: Programmer-Timmy <122127801+Programmer-Timmy@users.noreply.github.com>
Co-authored-by: Programmer-Timmy <122127801+Programmer-Timmy@users.noreply.github.com>
Co-authored-by: Programmer-Timmy <122127801+Programmer-Timmy@users.noreply.github.com>
Add entry_id to player activity event data; fix docs; verify ruff
This change eliminates the entry_id from the player_joined and player_left event data, streamlining the event payload.
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.
This update introduces events for when players join or leave the Satisfactory server. The events are fired on state changes, allowing users to create automations based on player activity. Additionally, the SatisfactoryCoordinator now accepts an entry_id to identify server instances.