| batteryCharge | Number:Dimensionless | % | Battery charge (percent) | no |
| batteryRuntime | Number:Time | s | Battery runtime (seconds) | no |
| batteryVoltage | Number:ElectricPotential | V | Battery voltage (V) | yes |
+| batteryTemperature | Number:Temperature | °C | Battery temperature (degrees C) | yes |
### Dynamic Channels
// Battery
BATTERY_CHARGE("batteryCharge", "battery.charge", Units.PERCENT),
BATTERY_RUNTIME("batteryRuntime", "battery.runtime", Units.SECOND),
- BATTERY_VOLTAGE("batteryVoltage", "battery.voltage", Units.VOLT);
+ BATTERY_VOLTAGE("batteryVoltage", "battery.voltage", Units.VOLT),
+ BATTERY_TEMPERATURE("batteryTemperature", "battery.temperature", SIUnits.CELSIUS);
static final Map<String, NutName> NUT_NAME_MAP = Stream.of(NutName.values())
.collect(Collectors.toMap(NutName::getChannelId, Function.identity()));
channel-type.networkupstools.battery-charge.description = Battery charge (percent)
channel-type.networkupstools.battery-runtime.label = Battery Runtime
channel-type.networkupstools.battery-runtime.description = Battery runtime (seconds)
+channel-type.networkupstools.battery-temperature.label = Battery Temperature
+channel-type.networkupstools.battery-temperature.description = Battery temperature (degrees C)
channel-type.networkupstools.battery-voltage.label = Battery Voltage
channel-type.networkupstools.battery-voltage.description = Battery voltage (V)
channel-type.networkupstools.input-current-status.label = Input Current Status
<description>Battery voltage (V)</description>
<state pattern="%.0f %unit%" readOnly="true"/>
</channel-type>
-
+ <channel-type id="battery-temperature" advanced="true">
+ <item-type>Number:Temperature</item-type>
+ <label>Battery Temperature</label>
+ <description>Battery temperature (degrees C)</description>
+ <state pattern="%.1f %unit%" readOnly="true"/>
+ </channel-type>
</thing:thing-descriptions>
<channel id="batteryCharge" typeId="battery-charge"/>
<channel id="batteryRuntime" typeId="battery-runtime"/>
<channel id="batteryVoltage" typeId="battery-voltage"/>
+ <channel id="batteryTemperature" typeId="battery-temperature"/>
<channel id="inputRealpower" typeId="input-realpower"/>
<channel id="inputVoltageStatus" typeId="input-voltage-status"/>
<channel id="inputQuality" typeId="input-quality"/>
<channel id="upsTestResult" typeId="ups-test-result"/>
</channels>
+ <properties>
+ <property name="thingTypeVersion">1</property>
+ </properties>
+
<config-description-ref uri="thing-type:ups:config"/>
</thing-type>
--- /dev/null
+<?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="networkupstools:ups">
+
+ <instruction-set targetVersion="1">
+ <add-channel id="batteryTemperature">
+ <type>networkupstools:battery-temperature</type>
+ </add-channel>
+ </instruction-set>
+
+ </thing-type>
+
+</update:update-descriptions>
private static final String THING_TYPES_XML = "thing-types.xml";
private static final String CHANNELS_XML = "channels.xml";
- private static final int EXPECTED_NUMBER_OF_CHANNELS = 20;
+ private static final int EXPECTED_NUMBER_OF_CHANNELS = 21;
private static final int EXPECTED_NUMMBER_OF_CHANNEL_XML_LINES = EXPECTED_NUMBER_OF_CHANNELS * 6;
// README table is: | Channel Name | Item Type | Unit | Description | Advanced