Commit graph

27 commits

Author SHA1 Message Date
7457a8284b Fix coordinator wiring after refactor
Two bugs left from the hass.data move that surfaced as soon as the
integration ran on the live HA:

* In async_setup_entry, devices were stored in hass.data AFTER
  coordinator.async_config_entry_first_refresh(), but
  _async_update_data reads them from hass.data — so the very first
  refresh raised KeyError 'devices' and the entry stayed in
  setup_retry. Move the hass.data update before first_refresh.

* SmartThingsDeviceTracker called self.async_on_update(...) which
  isn't a method on TrackerEntity. Without a working listener
  registration the tracker stayed restored=true / unavailable
  forever. Subscribe in async_added_to_hass and use async_on_remove
  for cleanup, which is the documented pattern.

Verified end-to-end on a live HA: phones/watch produce GPS, battery
sensors populate, and the Ring button triggers a SmartTag.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 02:01:05 +00:00
73aa86cfb5 Gitignore .env
The local .env holds a long-lived HA token used for development;
keep it out of any push.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 01:22:14 +00:00
13ff5a534e Replace broken QR login with manual JSESSIONID cookie
Samsung rebuilt account.samsung.com as a JS SPA backed by /iam/oauth2,
so the integration's HTML-scraping QR flow can no longer find the
signin URL and /accounts/v1/FMM2/signInWithQrCode now 404s. The STF
backend (chkLogin.do, getDeviceList.do, ...) is unchanged.

Replace the multi-step QR config flow with a single form that asks
the user to paste the JSESSIONID cookie copied from a logged-in
browser session at smartthingsfind.samsung.com. validate_jsessionid
hits chkLogin.do to verify the cookie before accepting it.

Also bundle in earlier compatibility fixes for newer HA: store
devices in hass.data so the coordinator can look them up by
entry_id, and use async_on_update on the device_tracker entity.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 01:16:22 +00:00
Vedeneb
13bd1dabe0
Add archive notice 2024-09-11 14:12:03 +02:00
freybene
2962498fc0 Bump version 2024-07-27 09:26:15 +02:00
freybene
922af5aea7 Allow manual reauth (fixes #16) 2024-07-27 09:25:59 +02:00
Vedeneb
ee87236579
Small README.md improvements 2024-06-20 06:43:38 +02:00
freybene
a5c832d080 Bump version 2024-06-19 12:17:26 +02:00
freybene
065163fdcc Add option to enable/disable active mode and make update_interval configurable (closes #11) 2024-06-19 12:15:05 +02:00
freybene
6f17edae14 Unescape device names (fixes #12) 2024-06-19 10:32:47 +02:00
freybene
6e4285f824 Use entry_id for local data (fixes #10, #13) 2024-06-19 09:11:56 +02:00
freybene
a2a9150a9b Bump version 2024-05-29 16:27:13 +02:00
freybene
0d1984558f Fix error when disabling single entity 2024-05-29 16:26:25 +02:00
freybene
9418cc61e6 Don't fetch data for disabled devices 2024-05-29 15:27:53 +02:00
freybene
8d68bbac4a Bump version 2024-05-29 14:24:50 +02:00
freybene
1e2b4c796c Add attribute last_seen 2024-05-29 14:24:31 +02:00
Vedeneb
9ba8f1dd76
Bump version for first release 2024-05-28 12:21:00 +02:00
freybene
65927af44e Add HACS support 2024-05-28 12:13:44 +02:00
freybene
47b65a802f Add hacs.json, prepare manifest for HACS 2024-05-28 12:02:52 +02:00
freybene
30b234945d Remove temporary logging 2024-05-28 11:53:01 +02:00
Vedeneb
0172067315
Create validate.yaml in preparation to HACS support 2024-05-28 11:50:25 +02:00
freybene
17184ed014 Fix encoding issues by adding 'Accept'-Header. Closes #1 2024-05-25 12:10:46 +02:00
freybene
0f9ae570f6 Add battery_level 'VERY_LOW', reduce some log levels, bump version_number 2024-05-25 08:20:20 +02:00
Vedeneb
5ba3e2848d
Update README.md 2024-05-24 22:11:26 +02:00
freybene
a8110339e6 Add screenshot 2024-05-24 22:10:35 +02:00
Vedeneb
6e20691976
Create LICENSE 2024-05-24 21:42:14 +02:00
freybene
ac2b38ad81 Initial commit 2024-05-24 21:39:41 +02:00