]> git.basschouten.com Git - openhab-addons.git/commit
[unifi] Fix portoverride to not remove any other data (#13362)
authorHilbrand Bouwkamp <hilbrand@h72.nl>
Sat, 10 Sep 2022 14:59:42 +0000 (16:59 +0200)
committerGitHub <noreply@github.com>
Sat, 10 Sep 2022 14:59:42 +0000 (16:59 +0200)
commit698703b0c6949347957403600e7cdca87b556f60
tree97aff6fa5d1c371e280c261cb8eb444f48381212
parent1f1de41bd3d7ccf50202aa6a5cf0260fecc5596f
[unifi] Fix portoverride to not remove any other data (#13362)

When a user has configured additional settings on a PoE port, like name.
These settings where lost when changing the PoEPort status in openHAB.
This was because in the binding only some information of the override was stored and when writing the new state this information would have been sent too.
In this change the object to store the override has been replaced by a plain json object. Therefore we don't have to know what is in it and all information is kept.

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
13 files changed:
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/UniFiController.java
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/UniFiControllerRequest.java
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/cache/UniFiControllerCache.java
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UnfiPortOverride.java [deleted file]
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UnfiPortOverrideJsonElement.java [new file with mode: 0644]
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UniFiDevice.java
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UniFiPortOverrides.java [deleted file]
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UniFiPortTable.java
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/dto/UniFiPortTuple.java [new file with mode: 0644]
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/api/util/UnfiPortOverrideJsonElementDeserializer.java [new file with mode: 0644]
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/handler/UniFiPoePortThingHandler.java
bundles/org.openhab.binding.unifi/src/main/java/org/openhab/binding/unifi/internal/handler/UniFiThingDiscoveryService.java
bundles/org.openhab.binding.unifi/src/main/resources/OH-INF/i18n/unifi.properties