mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[ipobserver] Add channel rainTotal (#17727)
* Add totalRain channel Signed-off-by: Leo Siepel <leosiepel@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
6e51b2955b
commit
d03a4ea419
@ -55,6 +55,7 @@ public class IpObserverBindingConstants {
|
||||
public static final String WEEKLY_RAIN = "rainForWeek";
|
||||
public static final String MONTHLY_RAIN = "rainForMonth";
|
||||
public static final String YEARLY_RAIN = "rainForYear";
|
||||
public static final String TOTAL_RAIN = "rainTotal";
|
||||
public static final String INDOOR_BATTERY = "batteryIndoor";
|
||||
public static final String OUTDOOR_BATTERY = "batteryOutdoor";
|
||||
public static final String RESPONSE_TIME = "responseTime";
|
||||
|
@ -298,6 +298,7 @@ public class IpObserverHandler extends BaseThingHandler {
|
||||
createChannelHandler(WEEKLY_RAIN, QuantityType.class, ImperialUnits.INCH, "weeklyrainin");
|
||||
createChannelHandler(MONTHLY_RAIN, QuantityType.class, ImperialUnits.INCH, "monthlyrainin");
|
||||
createChannelHandler(YEARLY_RAIN, QuantityType.class, ImperialUnits.INCH, "yearlyrainin");
|
||||
createChannelHandler(TOTAL_RAIN, QuantityType.class, ImperialUnits.INCH, "totalrainin");
|
||||
createChannelHandler(UV_INDEX, DecimalType.class, SIUnits.CELSIUS, "UV");
|
||||
createChannelHandler(WIND_AVERAGE_SPEED, QuantityType.class, ImperialUnits.MILES_PER_HOUR, "windspeedmph");
|
||||
createChannelHandler(WIND_GUST, QuantityType.class, ImperialUnits.MILES_PER_HOUR, "windgustmph");
|
||||
|
@ -41,6 +41,7 @@ channel-type.ipobserver.rainHourlyRate.label = Rain Hourly Rate
|
||||
channel-type.ipobserver.rainHourlyRate.description = How much rain will fall in an Hour if the rate continues
|
||||
channel-type.ipobserver.rainToday.label = Rain Today
|
||||
channel-type.ipobserver.rainToday.description = Rain since Midnight
|
||||
channel-type.ipobserver.rainTotal.label = Total Rain
|
||||
channel-type.ipobserver.responseTime.label = Response Time
|
||||
channel-type.ipobserver.responseTime.description = How many milliseconds it took to fetch the sensor readings from livedata.htm
|
||||
channel-type.ipobserver.solarRadiation.label = Solar Radiation
|
||||
|
@ -29,12 +29,17 @@
|
||||
<channel id="rainForWeek" typeId="rainForWeek"/>
|
||||
<channel id="rainForMonth" typeId="rainForMonth"/>
|
||||
<channel id="rainForYear" typeId="rainForYear"/>
|
||||
<channel id="rainTotal" typeId="rainTotal"/>
|
||||
<channel id="batteryOutdoor" typeId="system.low-battery"/>
|
||||
<channel id="batteryIndoor" typeId="system.low-battery"/>
|
||||
<channel id="responseTime" typeId="responseTime"/>
|
||||
<channel id="lastUpdatedTime" typeId="lastUpdatedTime"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="thingTypeVersion">1</property>
|
||||
</properties>
|
||||
|
||||
<config-description>
|
||||
<parameter name="address" type="text" required="true">
|
||||
<context>network-address</context>
|
||||
@ -233,6 +238,12 @@
|
||||
<category>Rain</category>
|
||||
<state pattern="%.2f %unit%" readOnly="true"/>
|
||||
</channel-type>
|
||||
<channel-type id="rainTotal">
|
||||
<item-type>Number:Length</item-type>
|
||||
<label>Total Rain</label>
|
||||
<category>Rain</category>
|
||||
<state pattern="%.2f %unit%" readOnly="true"/>
|
||||
</channel-type>
|
||||
<channel-type id="lastUpdatedTime" advanced="true">
|
||||
<item-type>DateTime</item-type>
|
||||
<label>Last Updated Time</label>
|
||||
|
@ -0,0 +1,14 @@
|
||||
<?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="ipobserver:weatherstation">
|
||||
<instruction-set targetVersion="1">
|
||||
<add-channel id="rainTotal">
|
||||
<type>ipobserver:rainTotal</type>
|
||||
</add-channel>
|
||||
</instruction-set>
|
||||
</thing-type>
|
||||
|
||||
</update:update-descriptions>
|
Loading…
Reference in New Issue
Block a user