[ecowatt] Add channels for D+2 and D+3 (#13823)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
312b4e2faf
commit
7cbae110a0
|
@ -32,5 +32,7 @@ public class EcowattBindingConstants {
|
|||
// List of all Channel ids
|
||||
public static final String CHANNEL_TODAY_SIGNAL = "todaySignal";
|
||||
public static final String CHANNEL_TOMORROW_SIGNAL = "tomorrowSignal";
|
||||
public static final String CHANNEL_IN_TWO_DAYS_SIGNAL = "inTwoDaysSignal";
|
||||
public static final String CHANNEL_IN_THREE_DAYS_SIGNAL = "inThreeDaysSignal";
|
||||
public static final String CHANNEL_CURRENT_HOUR_SIGNAL = "currentHourSignal";
|
||||
}
|
||||
|
|
|
@ -212,6 +212,14 @@ public class EcowattHandler extends BaseThingHandler {
|
|||
if ((channelId == null || CHANNEL_TOMORROW_SIGNAL.equals(channelId)) && isLinked(CHANNEL_TOMORROW_SIGNAL)) {
|
||||
updateState(CHANNEL_TOMORROW_SIGNAL, getDaySignalState(response, now.plusDays(1)));
|
||||
}
|
||||
if ((channelId == null || CHANNEL_IN_TWO_DAYS_SIGNAL.equals(channelId))
|
||||
&& isLinked(CHANNEL_IN_TWO_DAYS_SIGNAL)) {
|
||||
updateState(CHANNEL_IN_TWO_DAYS_SIGNAL, getDaySignalState(response, now.plusDays(2)));
|
||||
}
|
||||
if ((channelId == null || CHANNEL_IN_THREE_DAYS_SIGNAL.equals(channelId))
|
||||
&& isLinked(CHANNEL_IN_THREE_DAYS_SIGNAL)) {
|
||||
updateState(CHANNEL_IN_THREE_DAYS_SIGNAL, getDaySignalState(response, now.plusDays(3)));
|
||||
}
|
||||
if ((channelId == null || CHANNEL_CURRENT_HOUR_SIGNAL.equals(channelId))
|
||||
&& isLinked(CHANNEL_CURRENT_HOUR_SIGNAL)) {
|
||||
updateState(CHANNEL_CURRENT_HOUR_SIGNAL, getHourSignalState(response, now));
|
||||
|
|
|
@ -9,6 +9,10 @@ thing-type.ecowatt.signals.label = Electricity Forecast
|
|||
thing-type.ecowatt.signals.description = The French electricity consumption forecasts
|
||||
thing-type.ecowatt.signals.channel.currentHourSignal.label = Current Hour Signal
|
||||
thing-type.ecowatt.signals.channel.currentHourSignal.description = The signal relating to the forecast consumption level for the current hour. Values are 1 for normal consumption (green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).
|
||||
thing-type.ecowatt.signals.channel.inThreeDaysSignal.label = In Three Days Signal
|
||||
thing-type.ecowatt.signals.channel.inThreeDaysSignal.description = The signal relating to the forecast consumption level in three days. Values are 1 for normal consumption (green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).
|
||||
thing-type.ecowatt.signals.channel.inTwoDaysSignal.label = In Two Days Signal
|
||||
thing-type.ecowatt.signals.channel.inTwoDaysSignal.description = The signal relating to the forecast consumption level in two days. Values are 1 for normal consumption (green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).
|
||||
thing-type.ecowatt.signals.channel.todaySignal.label = Today Signal
|
||||
thing-type.ecowatt.signals.channel.todaySignal.description = The signal relating to the forecast consumption level for today. Values are 1 for normal consumption (green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).
|
||||
thing-type.ecowatt.signals.channel.tomorrowSignal.label = Tomorrow Signal
|
||||
|
|
|
@ -20,6 +20,18 @@
|
|||
consumption
|
||||
(green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).</description>
|
||||
</channel>
|
||||
<channel id="inTwoDaysSignal" typeId="signal">
|
||||
<label>In Two Days Signal</label>
|
||||
<description>The signal relating to the forecast consumption level in two days. Values are 1 for normal
|
||||
consumption
|
||||
(green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).</description>
|
||||
</channel>
|
||||
<channel id="inThreeDaysSignal" typeId="signal">
|
||||
<label>In Three Days Signal</label>
|
||||
<description>The signal relating to the forecast consumption level in three days. Values are 1 for normal
|
||||
consumption
|
||||
(green), 2 for strained electrical system (orange) and 3 for very strained electrical system (red).</description>
|
||||
</channel>
|
||||
<channel id="currentHourSignal" typeId="signal">
|
||||
<label>Current Hour Signal</label>
|
||||
<description>The signal relating to the forecast consumption level for the current hour. Values are 1 for normal
|
||||
|
|
Loading…
Reference in New Issue