Skip to content

Fixing issues in timestamp MQTT publisher#1

Open
cmos486 wants to merge 1 commit into
endeavour:mainfrom
cmos486:feature/mqtt-homeassistant
Open

Fixing issues in timestamp MQTT publisher#1
cmos486 wants to merge 1 commit into
endeavour:mainfrom
cmos486:feature/mqtt-homeassistant

Conversation

@cmos486
Copy link
Copy Markdown

@cmos486 cmos486 commented May 18, 2025

This PR introduces publish_mqtt.py, a script that publishes tracker locations from Google Find My Tools to an MQTT broker, compatible with Home Assistant's device_tracker discovery.

✅ Key features:

  • Supports Home Assistant MQTT Discovery (state + attributes).
  • Parses and normalizes timestamp values, fixing issues like:
    • invalid literal for int() with base 10: '2025-05-18 10:37:46'
    • int too big to convert from millisecond values.

Captura de pantalla 2025-05-18 a las 13 22 07

  • Gracefully handles location fetch errors per device.

Tested successfully with multiple Bluetooth and Android trackers.

Let me know if you'd prefer this as an example script or if you'd like further integration.

Thanks for this awesome tool!

… (fix 'int too big to convert' and string timestamp parsing)
@cmos486 cmos486 changed the title Add MQTT publisher script for Home Assistant with robust timestamp handling Fixing issues in timestamp MQTT publisher May 18, 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.

2 participants