Add air pressure to weather card

This commit is contained in:
Elara 2021-12-13 12:17:32 -08:00
parent 8a00e40402
commit 0dec4e27aa

View File

@ -57,9 +57,9 @@ const metaweatherContent = `
<p><b>Predictability:</b> %d%%</p> <p><b>Predictability:</b> %d%%</p>
</div> </div>
<div class="column has-text-centered"> <div class="column has-text-centered">
<p><b>Air Pressure:</b> %s</p>
<p><b>Wind Direction:</b> %s</p> <p><b>Wind Direction:</b> %s</p>
<p><b>Location:</b> %s</p> <p><b>Location:</b> %s</p>
<p><b>Timezone:</b> %s</p>
</div> </div>
</div>` </div>`
@ -228,12 +228,12 @@ func (mc *MetaweatherCard) Content() template.HTML {
convert(mc.resp.Consolidated[0].Visibility, "visibility", units.Mile), convert(mc.resp.Consolidated[0].Visibility, "visibility", units.Mile),
// Write predictability percentage // Write predictability percentage
mc.resp.Consolidated[0].Predictability, mc.resp.Consolidated[0].Predictability,
// Write air pressure
convert(mc.resp.Consolidated[0].AirPressure, "pressure", units.HectoPascal),
// Write compass wind direction // Write compass wind direction
mc.resp.Consolidated[0].WindCompass, mc.resp.Consolidated[0].WindCompass,
// Write title // Write title
mc.resp.Title, mc.resp.Title,
// Write timezone
mc.resp.Timezone,
)) ))
} }