mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[tesla] Change center_display_state from switch to number (#12030)
* Change center_display_state from switch to number Signed-off-by: Kai Kreuzer <kai@openhab.org> * Update property file Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
parent
ab2f6b0afe
commit
e9b0620c86
@ -100,7 +100,7 @@ Additionally, these advanced channels are available (not all are available on al
|
||||
| batteryheaternopower | Switch | Battery Heater Power | Indicates if there is enough power to use the battery heater |
|
||||
| batteryrange | Number:Length | Battery Range | Range of the battery |
|
||||
| calendarenabled | Switch | Calendar Enabled | Indicates if access to a remote calendar is enabled |
|
||||
| centerdisplay | Switch | Central Display State | Indicates the state of the central display in the vehicle |
|
||||
| centerdisplay | Number | Central Display State | Indicates the state of the central display in the vehicle, see [here](https://tesla-api.timdorr.com/vehicle/state/vehiclestate) for valid values |
|
||||
| centerrearseatheater | Switch | Center Rear Seat Heater | Indicates if the center rear seat heater is switched on |
|
||||
| charge | Switch | Charge | Start (ON) or stop (OFF) charging |
|
||||
| chargecable | String | Charge Cable | Undocumented / To be defined |
|
||||
|
@ -119,18 +119,7 @@ public class TeslaChannelSelectorProxy {
|
||||
}
|
||||
},
|
||||
CAR_VERSION("car_version", "version", StringType.class, true),
|
||||
CENTER_DISPLAY("center_display_state", "centerdisplay", OnOffType.class, false) {
|
||||
@Override
|
||||
public State getState(String s, TeslaChannelSelectorProxy proxy, Map<String, String> properties) {
|
||||
if (s.equals("true") || s.equals("1")) {
|
||||
return super.getState("ON");
|
||||
}
|
||||
if (s.equals("false") || s.equals("0")) {
|
||||
return super.getState("OFF");
|
||||
}
|
||||
return super.getState(s);
|
||||
}
|
||||
},
|
||||
CENTER_DISPLAY("center_display_state", "centerdisplay", DecimalType.class, false),
|
||||
CHARGE(null, "charge", OnOffType.class, false) {
|
||||
@Override
|
||||
public State getState(String s, TeslaChannelSelectorProxy proxy, Map<String, String> properties) {
|
||||
|
@ -71,6 +71,15 @@ channel-type.tesla.calendarenabled.label = Calendar Enabled
|
||||
channel-type.tesla.calendarenabled.description = Indicates if access to a remote calendar is enabled
|
||||
channel-type.tesla.centerdisplay.label = Central Display State
|
||||
channel-type.tesla.centerdisplay.description = Indicates the state of the central display in the vehicle
|
||||
channel-type.tesla.centerdisplay.state.option.0 = Off
|
||||
channel-type.tesla.centerdisplay.state.option.2 = On, Standby or Camp Mode
|
||||
channel-type.tesla.centerdisplay.state.option.3 = On, Charging Screen
|
||||
channel-type.tesla.centerdisplay.state.option.4 = On
|
||||
channel-type.tesla.centerdisplay.state.option.5 = On, Big Charging Screen
|
||||
channel-type.tesla.centerdisplay.state.option.6 = On, Ready to Unlock
|
||||
channel-type.tesla.centerdisplay.state.option.7 = Sentry Mode
|
||||
channel-type.tesla.centerdisplay.state.option.8 = Dog Mode
|
||||
channel-type.tesla.centerdisplay.state.option.9 = Media
|
||||
channel-type.tesla.centerrearseatheater.label = Center Rear Seat Heater
|
||||
channel-type.tesla.centerrearseatheater.description = Indicates if the center rear seat heater is switched on
|
||||
channel-type.tesla.charge.label = Charge
|
||||
|
@ -58,10 +58,22 @@
|
||||
<state readOnly="true"></state>
|
||||
</channel-type>
|
||||
<channel-type id="centerdisplay" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<item-type>Number</item-type>
|
||||
<label>Central Display State</label>
|
||||
<description>Indicates the state of the central display in the vehicle</description>
|
||||
<state readOnly="true"></state>
|
||||
<state readOnly="true">
|
||||
<options>
|
||||
<option value="0">Off</option>
|
||||
<option value="2">On, Standby or Camp Mode</option>
|
||||
<option value="3">On, Charging Screen</option>
|
||||
<option value="4">On</option>
|
||||
<option value="5">On, Big Charging Screen</option>
|
||||
<option value="6">On, Ready to Unlock</option>
|
||||
<option value="7">Sentry Mode</option>
|
||||
<option value="8">Dog Mode</option>
|
||||
<option value="9">Media</option>
|
||||
</options>
|
||||
</state>
|
||||
</channel-type>
|
||||
<channel-type id="centerrearseatheater" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
|
Loading…
Reference in New Issue
Block a user