Tutorial: Visualizing hourly energy prices with a Gauge
Last updated
Last updated
The widget can be configured to display hourly energy prices. This tutorial will walk you through the steps to set up a gauge that dynamically updates based on real-time price data. It's an ideal way to monitor energy costs throughout the day!
In this tutorial, you are expected to link each new Homey card to the one from the previous step, to ensure that each action is executed in the correct order.
Create an action card using the DataVista range action card to define the range.
Choose an identifier for this price range, such as "Hourly energy price". This will be used later as a datasource in the widget to display the price.
Set the value to the price token from either step 1 or 2 by selecting the appropriate price token.
Set the units to your currency (e.g., "€" for EUR or "$" for USD) and configure it to display the symbol either before or after the value. This will ensure that the currency symbol appears after the value, making it clear that the displayed amount represents a price, such as € 0.20
or 0.20 USD
.
Do not overwrite the label, unless you prefer to display a fixed value instead of the actual price.
Create an action card using the DataVista gauge configuration action card to define the visualization.
Choose an identifier for this gauge, such as "Visualization for hourly energy price." This identifier will be used later as a config source in the widget to apply the visualization.
Set the axes color to, for example, green
at a value of 0
, yellow
at 0.10
, orange
at 0.30
, and red
at 1
.
This will ensure the gauge reflects the appropriate colors based on the value. In this example, any value above 1 will be displayed in red, anything below 0 will be green, and the values will transition through yellow and orange at the specified offsets (0.10 and 0.30) accordingly.
You do not have to fill in all values. Any value not filled in will be skipped.
Optionally, you can format the price token using an action card (for example, by leveraging the ). This allows you to customize the price, such as adjusting the number of decimal places to 2.
Set the minimum and maximum values. Either use the Lowest price today and Highest price today respectively from the app, or set a fixed value, like 0 to 2.
Finally, follow the steps outlined in "" to add an Advanced Gauge and select the DataVista identifier you created in step 3.1
as the datasource. Then, select the configsource you created in step 4.1
. This will link the range, value, and visualization to the gauge.