Skip to content

Commit

Permalink
remove obsolet topic (#1621)
Browse files Browse the repository at this point in the history
* remove obsolet topic

* update file version
  • Loading branch information
LKuemmel authored Jun 24, 2024
1 parent f6e931e commit 7c7b5e8
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 32 deletions.
3 changes: 1 addition & 2 deletions data/config/mosquitto/openwb_local.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# openwb-version:13
# openwb-version:14
listener 1886 localhost
allow_anonymous true

Expand All @@ -25,7 +25,6 @@ topic openWB/chargepoint/+/set/phases_to_use out 2
topic openWB/chargepoint/+/set/manual_lock out 2
topic openWB/chargepoint/+/set/autolock_state out 2
topic openWB/chargepoint/+/set/rfid out 2
topic openWB/chargepoint/+/set/change_ev_permitted out 2
topic openWB/chargepoint/+/get/# out 2
topic openWB/chargepoint/+/config/# out 2
topic openWB/chargepoint/template/# out 2
Expand Down
1 change: 0 additions & 1 deletion packages/control/chargepoint/chargepoint_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def log_factory() -> Log:

@dataclass
class Set:
change_ev_permitted: bool = False
charging_ev: int = -1
charging_ev_prev: int = -1
current: float = 0
Expand Down
1 change: 0 additions & 1 deletion packages/helpermodules/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ def addChargepoint(self, connection_id: str, payload: dict) -> None:
def setup_added_chargepoint():
Pub().pub(f'openWB/chargepoint/{new_id}/config', chargepoint_config)
Pub().pub(f'openWB/chargepoint/{new_id}/set/manual_lock', False)
Pub().pub(f'openWB/chargepoint/{new_id}/set/change_ev_permitted', False)
{Pub().pub(f"openWB/chargepoint/{new_id}/get/"+k, v) for (k, v) in asdict(chargepoint.Get()).items()}
self.max_id_hierarchy = self.max_id_hierarchy + 1
Pub().pub("openWB/set/command/max_id/hierarchy", self.max_id_hierarchy)
Expand Down
2 changes: 0 additions & 2 deletions packages/helpermodules/setdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,6 @@ def process_chargepoint_topic(self, msg: mqtt.MQTTMessage):
self._validate_value(msg, float)
elif "/set/log" in msg.topic:
self._validate_value(msg, "json")
elif "/set/change_ev_permitted" in msg.topic:
self._validate_value(msg, "json")
elif "/config/ev" in msg.topic:
self._validate_value(
msg, int, [(0, float("inf"))], pub_json=True)
Expand Down
1 change: 0 additions & 1 deletion packages/helpermodules/update_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class UpdateConfig:
"^openWB/chargepoint/[0-9]+/set/plug_state_prev$",
"^openWB/chargepoint/[0-9]+/set/plug_time$",
"^openWB/chargepoint/[0-9]+/set/rfid$",
"^openWB/chargepoint/[0-9]+/set/change_ev_permitted$",
"^openWB/chargepoint/[0-9]+/set/log$",
"^openWB/chargepoint/[0-9]+/set/phases_to_use$",
"^openWB/chargepoint/[0-9]+/set/charging_ev_prev$",
Expand Down
1 change: 0 additions & 1 deletion packages/modules/display_themes/cards/source/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export default {
"openWB/chargepoint/+/get/plug_state",
"openWB/chargepoint/+/get/power",
"openWB/chargepoint/+/get/rfid",
"openWB/chargepoint/+/set/change_ev_permitted",
"openWB/chargepoint/+/set/current",
"openWB/chargepoint/+/set/manual_lock",
"openWB/chargepoint/+/set/log",
Expand Down
17 changes: 0 additions & 17 deletions packages/modules/display_themes/cards/source/src/stores/mqtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,23 +450,6 @@ export const useMqttStore = defineStore("mqtt", {
return 0;
};
},
getChargePointVehicleChangePermitted(state) {
return (chargePointId) => {
if (
Array.isArray(
state.topics[
`openWB/chargepoint/${chargePointId}/set/change_ev_permitted`
],
)
) {
// topic payload is an array [bool, String]!
return state.topics[
`openWB/chargepoint/${chargePointId}/set/change_ev_permitted`
][0];
}
return true;
};
},
getChargePointConnectedVehicleConfig(state) {
return (chargePointId) => {
return state.topics[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,7 @@ export default {
},
handleVehicleClick(chargePointId) {
if (
!this.changesLocked &&
this.mqttStore.getChargePointVehicleChangePermitted(chargePointId)
!this.changesLocked
) {
this.modalChargePointId = chargePointId;
this.modalVehicleSelectVisible = true;
Expand Down Expand Up @@ -396,11 +395,6 @@ export default {
size="lg"
class="full-width"
:class="!changesLocked ? 'clickable' : ''"
:disabled="
!mqttStore.getChargePointVehicleChangePermitted(
modalChargePointId,
)
"
@click="handleVehicleClick(id)"
>
<font-awesome-icon fixed-width :icon="['fas', 'fa-car']" />
Expand Down

0 comments on commit 7c7b5e8

Please sign in to comment.