/ // kianhean.com / blog

random ramblings about technology in Singapore

topics
about
home automation



Home Automation - Scraping Latest Electricity Prices in Singapore and Displaying it

published: May 17, 2023

dashboard

we will learn how to get the SP import tariff

Create a scrape integration

Go to settings -> devices -> add integration -> Scrape

Set up the resource like so

dashboard

resource

https://www.ema.gov.sg/Residential_Electricity_Tariffs.aspx

Set up the sensor like so

dashboard

select

.tarrif-rates

value template

{{ value.split(" ")[0]|string|regex_replace(find='cents', replace='', ignorecase=True)|float }}

Add it to your dashboard

use it like any other sensor by searching it by name by searching for the entity id

dashboard