diff --git a/lib/nerves_motd.ex b/lib/nerves_motd.ex index ac53547..3c43d72 100644 --- a/lib/nerves_motd.ex +++ b/lib/nerves_motd.ex @@ -115,7 +115,7 @@ defmodule NervesMOTD do defp temperature_row() do case runtime_mod().cpu_temperature() do {:ok, temperature_c} -> - [{"Temperature", :erlang.float_to_binary(temperature_c, decimals: 1)}] + [{"Temperature", [:erlang.float_to_binary(temperature_c, decimals: 1), "°C"]}] _ -> nil diff --git a/test/nerves_motd_test.exs b/test/nerves_motd_test.exs index 39ad549..a2277f8 100644 --- a/test/nerves_motd_test.exs +++ b/test/nerves_motd_test.exs @@ -93,7 +93,7 @@ defmodule NervesMOTDTest do |> Mox.expect(:applications, 1, default_applications_code()) |> Mox.expect(:cpu_temperature, 1, fn -> {:ok, 41.234} end) - assert capture_motd() =~ ~r/Temperature : 41.2/ + assert capture_motd() =~ ~r/Temperature : 41.2°C/ end test "Temperature when unavailable" do