Fluid Storage Input Source ​
lua
telem.input.fluidStorage (peripheralID: string)
This adapter produces a metric for each fluid ID in a fluid storage peripheral (tank, drum, etc.), with the metric name being the fluid ID and the value being the total amount of that fluid in storage.
Usage ​
lua
local telem = require 'telem'
local backplane = telem.backplane()
:addInput('my_fluid', telem.input.fluidStorage('functionalstorage:fluid_2'))
:cycleEvery(1)()
Given a fluid storage peripheral with the ID functionalstorage:fluid_2
and the following tanks:
This appends the following metrics to the backplane:
Name | Value | Unit |
---|---|---|
storage:minecraft:lava | 11 | B |
storage:minecraft:water | 6 | B |