mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[bambulab] Add layer-total channel (#20234)
* Total layers Signed-off-by: Martin Grześlowski <martin.grzeslowski@gmail.com>
This commit is contained in:
+1
@@ -61,6 +61,7 @@ public class BambuLabBindingConstants {
|
||||
CHANNEL_BIG_FAN_2_SPEED("big-fan2-speed"),
|
||||
CHANNEL_HEAT_BREAK_FAN_SPEED("heat-break-fan-speed"),
|
||||
CHANNEL_LAYER_NUM("layer-num"),
|
||||
CHANNEL_LAYER_TOTAL("layer-total"),
|
||||
CHANNEL_SPEED_LEVEL("speed-level", true),
|
||||
CHANNEL_TIME_LAPS("time-laps"),
|
||||
CHANNEL_USE_AMS("use-ams"),
|
||||
|
||||
+1
@@ -430,6 +430,7 @@ public class PrinterHandler extends BaseBridgeHandler
|
||||
case CHANNEL_BIG_FAN_2_SPEED -> parseDecimalType(print.bigFan2Speed());
|
||||
case CHANNEL_HEAT_BREAK_FAN_SPEED -> parseDecimalType(print.heatbreakFanSpeed());
|
||||
case CHANNEL_LAYER_NUM -> parseDecimalType(print.layerNum());
|
||||
case CHANNEL_LAYER_TOTAL -> parseDecimalType(print.totalLayerNum());
|
||||
// boolean
|
||||
case CHANNEL_TIME_LAPS -> parseOnOffType(print.timelapse());
|
||||
case CHANNEL_USE_AMS -> parseOnOffType(print.useAms());
|
||||
|
||||
+2
@@ -42,6 +42,8 @@ thing-type.bambulab.printer.channel.heat-break-fan-speed.label = Heat Break Fan
|
||||
thing-type.bambulab.printer.channel.heat-break-fan-speed.description = Speed of the heat break cooling fan (RPM).
|
||||
thing-type.bambulab.printer.channel.layer-num.label = Current Layer Number
|
||||
thing-type.bambulab.printer.channel.layer-num.description = Current layer being printed.
|
||||
thing-type.bambulab.printer.channel.layer-total.label = Total Layer Number
|
||||
thing-type.bambulab.printer.channel.layer-total.description = Total number of layers to print.
|
||||
thing-type.bambulab.printer.channel.led-chamber.label = Chamber LED
|
||||
thing-type.bambulab.printer.channel.led-chamber.description = Controls the LED lighting inside the printer chamber.
|
||||
thing-type.bambulab.printer.channel.led-work.label = Work Area LED
|
||||
|
||||
@@ -95,6 +95,10 @@
|
||||
<label>Current Layer Number</label>
|
||||
<description>Current layer being printed.</description>
|
||||
</channel>
|
||||
<channel id="layer-total" typeId="number">
|
||||
<label>Total Layer Number</label>
|
||||
<description>Total number of layers to print.</description>
|
||||
</channel>
|
||||
<channel id="speed-level" typeId="speed-level"/>
|
||||
<channel id="time-laps" typeId="boolean">
|
||||
<label>time-lapse Enabled</label>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">
|
||||
|
||||
<thing-type uid="bambulab:printer">
|
||||
<instruction-set targetVersion="1">
|
||||
<add-channel id="layer-total">
|
||||
<type>bambulab:number</type>
|
||||
<label>Total Layer Number</label>
|
||||
<description>Total number of layers to print.</description>
|
||||
</add-channel>
|
||||
</instruction-set>
|
||||
</thing-type>
|
||||
|
||||
</update:update-descriptions>
|
||||
Reference in New Issue
Block a user