Components

SmartMeterItem

<SmartMeterItem energyUrl powerUrl />

Constructor

# <SmartMeterItem energyUrl powerUrl />

This component is just a container used to hold any SmartMeter sensor item. It is responsible for making periodic calls to fetch the current value of the sensor to be displayed in the dashboard. It relies on useMultipleFetch and useInterval hooks.

PropTypes:
Name Type Required Description Default
energyUrl string Yes The endpoint to fetch the current energy value from.
powerUrl string Yes The endpoint to fetch the current power value from.

View Source components/dashboard/SmartMeterItem.jsx, line 19

<SmartMeterItem />