set_button.addEventListener("click", function() {
                // get the values
                var is_random = is_random_control.checked
                var random_min = parseInt(random_min_control.value)
                var random_max = parseInt(random_max_control.value)
                var value = parseInt(value_control.value)

                var payload = {
                    "port": "{{sensor.port}}",
                    'value': value,
                    'is_random': is_random,
                