pathec / ZWay-OpenHABConnector

This module register openHAB items that will notified after status changed.
GNU General Public License v3.0
3 stars 4 forks source link

Convert protocol to lowercase before comparison #5

Closed syphr42 closed 6 years ago

syphr42 commented 6 years ago

In the current state, if the user enters HTTPS (all caps like the documentation states), the module will fail to recognize it since it is comparing against https (lowercase) and will override the setting to http. If this happens, the user will have to realize what's going on and change it to https (lowercase) and then it works as expected.

With this change, the protocol is always converted to lowercase (if it is defined) so there are no issues comparing values.

pathec commented 6 years ago

Hi @syphr42,

thank you for your addition.