id: sim-devices topic: sim-world title: The bundled sim devices — drive a world without an HC3 pins: - tests/test_qa.py::test_sim_device_sensor_ui - tests/test_qa.py::test_load_sim_device_bundled verified: flua 0.1.168
src/flua/simdevices/*.lua ship in the wheel and load by bare name:
local motion = _FLUA.loadSimDevice("motionSensor")
fibaro.call(motion, "breach") -- value = true
local temp = _FLUA.loadSimDevice("temperatureSensor",
{"name:Hall temp", "property:value=21.5", "property:unit=C"})
setValue(value, unit?); breach sensors
setValue(bool)/breach/clearBreach (the sensor's value IS the
breach state); switches turnOn/turnOff; weatherMgr drives
PUT /weather with sliders.--ui doubles as a test bench. Boot value is a number
(0), never the skeleton's empty string (Lua truthiness would make
value > threshold crash)._FLUA.keepAlive()) and are the
builder's offline pickers (sim: picks).