Packages

A Gleam library to write and run Home Assistant automations.

Current section

Files

Jump to
glome src system.erl
Raw

src/system.erl

-module(system).
-export([get_var/1]).
get_var(Name) ->
case os:getenv(binary_to_list(Name)) of
false -> {error, nil};
Value -> {ok, list_to_binary(Value)}
end.