From 39682a4cf1c427f149285593175dd19129a326b2 Mon Sep 17 00:00:00 2001 From: garyd9 Date: Sun, 9 Aug 2020 13:55:40 -0400 Subject: [PATCH] add more vars to json state --- usermods/UserModv2_SunRiseAndSet/UserMod_SunRiseAndSet.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usermods/UserModv2_SunRiseAndSet/UserMod_SunRiseAndSet.h b/usermods/UserModv2_SunRiseAndSet/UserMod_SunRiseAndSet.h index de92a7a5..a22c17fb 100644 --- a/usermods/UserModv2_SunRiseAndSet/UserMod_SunRiseAndSet.h +++ b/usermods/UserModv2_SunRiseAndSet/UserMod_SunRiseAndSet.h @@ -160,6 +160,13 @@ public: snprintf(buf, 10, "%02d:%02d UTC", m_nUserSunset / 60, m_nUserSunset % 60); user["set"] = buf; } + JsonObject vars = user.createNestedObject("vars"); + vars["lat"] = m_fLatitude; + vars["long"] = m_fLongitude; + vars["rise_mac"] = m_sunriseMacro; + vars["set_mac"] = m_sunsetMacro; + vars["rise_off"] = m_sunriseOffset; + vars["set_off"] = m_sunsetMacro; } ~UserMod_SunRiseAndSet(void)