feat(ws_bridge): add trackers: for GPS device_tracker entities - #284
Merged
Conversation
ESPHome has no device_tracker: domain, so a `platform: ws_bridge` entry isn't possible for one. Adds a `trackers:` list under the ws_bridge: hub instead — each entry becomes a WsBridgeTracker (PollingComponent + WsBridgeDevice), so it's re-declared automatically on connect and on every periodic re-announce like every other platform entity, rather than requiring the caller to hook on_declare by hand. latitude/longitude/gps_accuracy accept a plain float or !lambda (cv.templatable/cg.templatable, matching the pattern already used by sip_client/tcp_server in this repo). A NaN latitude/longitude (no GPS fix yet) is reported as an explicit "unknown" state rather than sending 0,0, which Home Assistant can't tell apart from a real reading. Updates the CI test config and README with a worked example.
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.
ESPHome has no device_tracker: domain, so a
platform: ws_bridgeentry isn't possible for one. Adds atrackers:list under the ws_bridge: hub instead — each entry becomes a WsBridgeTracker (PollingComponent + WsBridgeDevice), so it's re-declared automatically on connect and on every periodic re-announce like every other platform entity, rather than requiring the caller to hook on_declare by hand.latitude/longitude/gps_accuracy accept a plain float or !lambda (cv.templatable/cg.templatable, matching the pattern already used by sip_client/tcp_server in this repo). A NaN latitude/longitude (no GPS fix yet) is reported as an explicit "unknown" state rather than sending 0,0, which Home Assistant can't tell apart from a real reading.
Updates the CI test config and README with a worked example.