Controlling a Samsung oven from Home Assistant

My oven is a Samsung range that talks to SmartThings. Home Assistant’s official SmartThings integration can see it, but it cannot set a mode, a temperature, and a timer and then press start. That is the part I wanted: preheat from a phone or an automation without touching the panel.

What exists

An open-source integration by gwyntel did most of this. It creates a device in Home Assistant with five entities: a mode selector, a temperature number, a cook-time number, a start button, and a clock-sync button. Mode-specific temperature ranges are enforced, so you cannot ask for a 175°F air fry. It talks to the SmartThings REST API using the OAuth token Home Assistant already holds, so there is nothing extra to configure beyond the oven’s device ID.

The upstream repository went quiet in September 2025 with one real bug open.

The bug

SmartThings access tokens last about 24 hours. The integration read the token once at startup, stored the string, and handed it to every entity. A day after every restart, every command started failing with an HTTP 401 and stayed broken until you reloaded the integration by hand. The helper that was supposed to find a fresh token only ever read the cached one from disk, so nothing triggered a refresh.

The fix

Resolve the token per request instead of caching it. The integration now asks Home Assistant’s OAuth2 session for the official SmartThings config entry, which refreshes the token when it has expired. If the API still returns 401, it forces a refresh and retries the request once. A fallback still reads from storage for config entries that predate application credentials.

I sent this upstream as a pull request. It has not been merged, so this fork is the maintained copy and installs through HACS as a custom repository. Credit for the original integration stays with gwyntel under the MIT license.

The automation that actually uses it

The one that runs every time is the clock. After a power outage the range comes back with its clock blinking, and the built-in SmartThings integration cannot set it. This integration has a sync button, so an automation presses it. Two ways in: the range drops offline for two minutes and then returns, which filters out short cloud blips that are not power loss, or Home Assistant itself starts up, which is what really happens in an outage since it is on the same house power. Either way it waits five minutes for the range to finish booting and reconnect, checks it is actually back, and presses sync. Before the token fix this needed a reload-the-integration workaround first. Now it just presses the button.

Notes

  • Tested against model DA-KS-RANGE-0101X. Other SmartThings ovens with the same capability set should work, but I have only the one.
  • Home Assistant 2023.1 or later.
  • The oven still enforces its own safety rules. The integration cannot bypass the door interlock or the self-clean lockout, and should not.

Tagged home-assistant, smartthings, python, cooking.