Skip to content

Commit

Permalink
validate values in setdata
Browse files Browse the repository at this point in the history
  • Loading branch information
ndrsnhs committed Nov 29, 2024
1 parent 9992ce9 commit fcb6ed8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/helpermodules/setdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,14 @@ def process_optional_topic(self, msg: mqtt.MQTTMessage):
elif ("openWB/set/optional/et/provider" in msg.topic or
"openWB/set/optional/ocpp/config" in msg.topic):
self._validate_value(msg, "json")
elif "openWB/set/optional/zabbix/destination_host" in msg.topic:
self._validate_value(msg, str)
elif "openWB/set/optional/zabbix/hostname" in msg.topic:
self._validate_value(msg, str)
elif "openWB/set/optional/zabbix/psk_identifier" in msg.topic:
self._validate_value(msg, str)
elif "openWB/set/optional/zabbix/psk_key" in msg.topic:
self._validate_value(msg, str)
elif "openWB/set/optional/rfid/active" in msg.topic:
self._validate_value(msg, bool)
elif "openWB/set/optional/int_display/rotation" in msg.topic:
Expand Down

0 comments on commit fcb6ed8

Please sign in to comment.