26 Commits

Author SHA1 Message Date
thatguygriff 8f39bebcc4 chore: bump version to 0.2.0
Validate / Hassfest validation (push) Has been skipped
Validate / HACS validation (push) Has been skipped
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 09:58:14 -03:00
thatguygriff 494c6df2c3 fix(climate): keep optimistic state until DKN cloud catches up
Validate / Hassfest validation (pull_request) Has been skipped
Validate / HACS validation (pull_request) Has been skipped
The DKN cloud REST endpoint lags behind the unit for several seconds
after a write, even though the unit itself and the DKN app reflect
the change immediately. The previous 2.5s optimistic-overlay TTL
expired well before the cloud caught up, so the next coordinator
publish (REST poll or socket device-data push) carried stale values
and the HA UI reverted to the previous setting.

Extend the overlay TTL to 30s as a safety bound, and track the
underlying device key + expected device value alongside each overlay.
On every coordinator publish, clear overlays whose device key now
reports the expected value (cloud has confirmed). The TTL still
caps how long a silently-failed write can hold a wrong value.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 09:49:04 -03:00
thatguygriff dd1cc76580 Treat 404 as auth error and persist refreshed tokens
Validate / Hassfest validation (pull_request) Failing after 20s
Validate / HACS validation (pull_request) Failing after 0s
The DKN Cloud NA API returns 404 (not 401) when tokens are expired,
which caused the integration to silently fail with UpdateFailed
indefinitely instead of attempting a token refresh or triggering
reauth. Refreshed tokens were also only held in memory, so they
were lost on Home Assistant restart.

- Add 404 to auth_error_statuses on is_logged_in, refresh_access_token,
  and fetch_installations.
- Persist refreshed access + refresh tokens back to the config entry
  after each successful coordinator update.
- Skip the entry reload listener for token-only option updates to
  avoid a reload loop on every refresh.
- Log API 4xx responses at WARNING with the body so failures are
  visible in HA logs without enabling debug logging.
2026-05-26 09:58:57 -03:00
Sebastien Lavoie aa81851243 resimplify 2026-03-30 20:49:57 -04:00
Sebastien Lavoie 04e1d488f9 Dynamic fan speeds 2026-03-30 20:35:13 -04:00
Sebastien Lavoie 0dab86d205 Send + ack 2026-03-30 10:07:01 -04:00
Sebastien Lavoie 9582cb0665 Fix incorrect data 2026-03-30 08:43:37 -04:00
Sebastien Lavoie 7f8bc63c62 Smoke test 2026-03-30 08:07:20 -04:00
Sebastien Lavoie f7aa9ac00f Fix socket connection 2026-03-29 10:06:16 -04:00
Sebastien Lavoie f805015b74 Implement write actions 2026-03-29 09:52:40 -04:00
Sebastien Lavoie 1e1df6a2e7 Implement socket connection 2026-03-29 09:40:54 -04:00
Sebastien Lavoie 39b8ef3f3b fix: remove invalid climate callback decorator 2026-03-29 09:28:23 -04:00
Sebastien Lavoie 8a4d040bac fix: implement DKN Cloud NA authentication 2026-03-29 09:22:43 -04:00
Sebastien Lavoie c9307b5c5b feat: add brand icons (256x256 and 512x512)
Daikin-blue rounded square with white snowflake motif.
Satisfies HACS brands check and HA integrations UI display.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 09:13:32 -04:00
Sebastien Lavoie fca5c51206 feat: add translations and entity strings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 08:58:27 -04:00
Sebastien Lavoie 56e9a80492 feat: add integration entry point
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 08:56:53 -04:00
Sebastien Lavoie a45258ea6e feat: add config flow with user, token_display, options, and reauth steps 2026-03-29 08:55:02 -04:00
Sebastien Lavoie ddd5b9f92c feat: add sensor and binary_sensor entity stubs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 08:53:03 -04:00
Sebastien Lavoie 515db83f19 fix: remove unused ATTR_TEMPERATURE import, add @callback to supported_features
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 08:52:00 -04:00
Sebastien Lavoie 54265f326e feat: add DknClimateEntity stub 2026-03-29 08:50:23 -04:00
Sebastien Lavoie 8c1c25a1a9 refactor: fix inner asyncio import and expose entry_id publicly on coordinator
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 08:49:00 -04:00
Sebastien Lavoie 60f7e1e980 feat: add DknEntity base with locks, overlays, and refresh 2026-03-29 08:47:34 -04:00
Sebastien Lavoie 8ba33ebd85 feat: add DknCoordinator 2026-03-29 08:46:08 -04:00
Sebastien Lavoie 0beaa71fdc feat: add DknCloudNaClient stub 2026-03-29 08:44:43 -04:00
Sebastien Lavoie 17e44e4546 feat: add manifest.json and constants 2026-03-29 08:43:05 -04:00
Sebastien Lavoie d145b117f2 feat: add HACS and hassfest CI validation 2026-03-29 08:40:43 -04:00